Recursively set permissions

To change the permissions of all files and / or folders insight the current folder recursively you can run one of  the following command:

$> sudo find . -type d -exec chmod 644 {} \; #all folders get 644
$> sudo find . -exec chmod g+r {} \;         #all files and folders get group read rights
$> sudo find . -type f -exec chmod 755 {} \; #all files get 755

All options can be found on http://unixhelp.ed.ac.uk/CGI/man-cgi?find.

1 thoughts on “Recursively set permissions

Leave a Reply

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

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.