How to change permissions of multiple files/folders recursively

We can in use chmod command along with find command to  to change permissions of multiple files/folders recursively.

For files,

#find . -type f -exec chmod 644 {} \;

This will change the permissions of all files in the current folder to 644 recursively. We can change the permission value according to our needs.
For Folders,

#find . -type d -exec chmod 755 {} \;

This will change the permissions of all folders in the current folder to 755 recursively. We can change the permission value according to our needs.

That's all....

Leave a Reply