Shell – change permissions recursively

Posted by & filed under Linux.

To change BOTH file and directory perms recursively:

chmod -R 777

To change just files:

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

To change just directories:

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

or this should work too:

chmod 644 $(find . -type f)
chmod 755 $(find . -type d)

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Bitnami