bash script to reset file perms on all files & sub-directories from current dir

find -type d -exec chmod 775 {} \; .

find -type f -exec chmod 664 {} \;

If write access restricted to only owner is desired, use:

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

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

 

Leave a Reply

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