Linux Mastering Development

Find specific folders and then change their ownership

I’m running into security issues with multiple WordPress websites, and I need to recursively change the ownership (and permissions) for folder "wp-content" (and whatever is inside them).

I need to find all the folders named wp-content (there are several) and change them and all their contents so that they’re owned by nginx:nginx with permissions 755 for folders and 644 for files.

I can’t figure out a way to find those folders and then change the ownership.

Any clues? :/

Leave a Reply

Your email address will not be published. Required fields are marked *