sudo chown nginx:nginx -R /var/www sudo find /var/www -type d -exec chmod 755 {} \; sudo find /var/www -type f -exec chmod 644 {} \;