Linux for Webservers

File and Folder permissions

On a webserver, files should have 644 permissions by default and directories should have 755 permissions.

To recursively change all directory permission to 755, and all file permissions to 644, run the following two commands from your site root directory:

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