cd www
# Let nginx be owner
sudo chown www-data:www-data . -R *
# Change directory permissions rwxr-xr-x
sudo find . -type d -exec chmod 755 {} \;
# Change file permissions rw-r--r--
sudo find . -type f -exec chmod 644 {} \;
cd www
# Let nginx be owner
sudo chown www-data:www-data . -R *
# Change directory permissions rwxr-xr-x
sudo find . -type d -exec chmod 755 {} \;
# Change file permissions rw-r--r--
sudo find . -type f -exec chmod 644 {} \;