ubuntu – NginX Permission denied

Nginx on Ubuntu

I have setup the root in the nginx config file /etc/nginx/sites-enabled/default to be root /home/username/builds/project; but when trying to view the site I see a 500 error and see the message "/home/username/builds/project/index.html" failed (13: Permission denied) in the logs.

I have run chmod -R 0755 builds to set the access for the builds folder but running sudo -u www-data stat /home/username/builds/ to test the access returns “Permission denied”. (sudo -u www-data stat /home/username/ shows it has access).

How can I give www-data access to the builds folder and its files?

Read more here: Source link