#Example Drupal permissions Setup credit: FranCarstens
CPanel User: username Site Root: /home/username/public_html Ownership
- Files and folders username:nobody
- Temporary Folder username:nobody
- Permissions
- Core modules folders 750 RWXR-X---
- Core modules files 640 RW-R-----
- Core themes folders 750 RWXR-X---
- Core themes files 640 RW-R-----
- Contrib modules folders 750 RWXR-X---
- Contrib modules files 640 RW-R-----
- Contrib themes folders 750 RWXR-X---
- Contrib themes files 640 RW-R-----
- Files folders 770 RWXRWX---
- Files files 660 RW-RW----
- Temporary folder 770 RWXRWX---
- Settings file 440 R--R-----
- Settings folder 750 RWXR-X---
- Update ownership for entire site and tmp folder
chown -R username:nobody /home/username/public_html
chown username:nobody /home/username/tmp
find /home/username/public_html/modules -type d -exec chmod 750 {} +
find /home/username/public_html/modules -type f -exec chmod 640 {} +
find /home/username/public_html/themes -type d -exec chmod 750 {} +
find /home/username/public_html/themes -type f -exec chmod 640 {} +
find /home/username/public_html/sites/all/modules -type d -exec chmod 750 {} +
find /home/username/public_html/sites/all/modules -type f -exec chmod 640 {} +
find /home/username/public_html/sites/all/themes -type d -exec chmod 750 {} +
find /home/username/public_html/sites/all/themes -type f -exec chmod 640 {} +
find /home/username/public_html/sites/default/files -type d -exec chmod 770 {} +
find /home/username/public_html/sites/default/files -type f -exec chmod 660 {} +
find /home/username/tmp -type d -exec chmod 770 {} +
chmod 440 /home/username/public_html/sites/default/settings.php
chmod 750 /home/username/public_html/sites/default