0

I have my root directory located inside my home folder:

/home/user/nginx-root

Nginx has it configured like that:

root /home/user/nginx-root

The root directory is owned by the user, but it has 775 set for directories and 664 set for files. These should be easily readable by root, but Nginx still complains:

2024/08/14 13:15:44 [error] 11459#11459: *5 "/home/user/nginx-root/index.html" is forbidden (13: Permission denied), client: 123.123.123.123, server: , request: "GET / HTTP/1.1", host: "example.com"

Doing a chown -R root:root nginx-root also does not work.

Could anybody help me with it?

Giacomo1968
  • 58,727

1 Answers1

0

It turns out that the permissions of /home/user were set to 700, and after changing it to 755 it started to work.

I don't know if it's a good practice to do so.

Giacomo1968
  • 58,727