How to CHOWN all Subfolders and Files?

Share This Post

The chown command in Linux may be used to alter the ownership of a directory or a file. This is critical when using scripts or utilities that need certain rights or ownership in order to perform their functions.

This is critical. An excellent example is WordPress’s automatic updating feature. WordPress requires www-data ownership in plugin directories and files.

The chown command can be made to work properly if you observe that ownership isn’t being passed down to subfolders and files.

How to CHOWN all Subfolders and Files?


The -R switch is all that is needed to ensure that chown changes ownership of subfolders and files. Recursively changing ownership is what this move entails.

chown -R USER:GROUP FOLDER

For example: 

chown -R www-data:www-data wp-plugin-folder

How to CHOWN all Subfolders and Files?

That’s all there is to it. To see other switches you can use with chown you can view its documentation.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Related Posts

How to Delete an Element by Key from an Array in PHP?

There are several ways to work with arrays in...

Manually Checking Your Computer For Windows 10 Compatibility

Many of the worries about upgrading to Windows 10...

Apple Music Classical app references again spotted in iOS code

More Apple Music Classical app references have been discovered...

Mysterious Wallet Whale Buys 3 Trillion Shiba Inu Tokens in One Transaction

3.37 trillion Shiba Inu Tokens were Acquired in one...
spot_img
- Advertisement -spot_img