A photo of Mitesh Shah

Mitesh Shah

Linux Expert | Automation Enthusiast | Security Consultant

Email Skype Github Twitter Resume Hire Me Keybase LinkedIn Stackoverflow


How to Fix Webroot Permissions

Overview

Change Ownership

[mitesh@Matrix ~]$ chown -R www-data:www-data /var/www

NOTE!: The www-data user is used by nginx and php5-fpm. If you are running php as a different user then change ownership as per that.

Reset Directory/File Permissions

# Correct Directory Permissions
[mitesh@Matrix ~]$ find /var/www -type d -exec chmod 0755 {} \;
# Correct Files Permissions
[mitesh@Matrix ~]$ find /var/www -type f -exec chmod 0644 {} \;




Post Navigation