chmod: Drupal Directory
# Drupal Files and Directory Permissions
1. Recursively chmod only files (-rw-r--r--)
find . -type f -exec chmod 644 {} \;
2. Recursively chmod only PHP files (-rw-r--r--)
find . -type f -name '*.php' -exec chmod 644 {} \;
3. Recursively chmod only directories (drwxr-xr-x)
find . -type d -exec chmod 755 {} \;
4. Files folder chmod (drwxrwxr-x)
chmod 775 files
5. settings.php file chmod (-r--r--r--)
chmod 444 settings.php
6. .htaccess (-rw-r--r--)
chmod 644 .htaccsss