Skip navigation

I find myself searching for this often enough to make a note of it.

sudo find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \;

or

sudo find /path/to/docroot/. -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \;

For SETUID/SETGID conscious configurations:

find /path/to/docroot -type d -exec chmod 2775 {} \; && find /path/to/docroot -type f -exec chmod 0664 {} \;

Leave a Reply