Recursive chmod in Linux and MacOSX

Recursively chmod directories only OR files only

Recursively search directory tree (starting at the current directory ‘dot’):

Recursively chmod 755 all directories only:

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

Recursively chmod 644 all files only (and ignore the directories):

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

I use this popular technique all of the time; hope it helps you.

Leave a comment

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