Recursively CHMOD Only Files or Directories via Command Line

Using the commands below, you can recursively chmod a large number of files or directories.

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

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

Important:
Remember to the command in the directory that you wish to recursively chmod.

Please use the above commands with care as it can potentially change an infinite number of files in one go.

This entry was posted in FAQ and tagged , , , . Bookmark the permalink.

Leave a Reply

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