11/23/2009

set chmod for folders only

Recursively chmod folders/directories only

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

This will recursively search directory tree (starting at dir ‘dot’) and chmod 755 all directories only.

Similarly, the following will chmod all files only (and ignore the folders/directories):

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

No comments: