CHMOD Files and Directories Recursively (Mac OS X)

November 23rd, 2010

In terminal, first cd into the directory you want to chmod.

To CHMOD only directories to 755:

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

To CHMOD only php files to 644:

find . -type f -name '*.php' -exec chmod 644 {} \;

This worked well to figure out permissions for my local WordPress install. I did have to specficially give my uploads directory write access, but it cleaned up all of the other files and folders.


  1. I always enjoy your topics, thanks a lot!

  2. With regular growth in the demand for eLearning it would be ideal if you could give this topic some consideration…

  3. chmod +X

  4. Great blog! Keep the good stuff coming!

Comments have been closed for this post. If you would like to ask a question or need help, please post in the forums.