Experiencing this issue. I checked the permissions for the index.php file and outputs:
-rw-r--r-- 1 www-data root 1.7K Jun 19 2023 sickofmetal/public/index.php
The user stated in www.conf file is
user = www-data
group = www-data
listen.mode = 0660
However, there is still a problem with this user being able to open or even do "cat" on index.php.
The browser shows "404 Not Found" and the error log is this:
2024/02/28 08:49:20 [crit] 3080#3080: *1 stat() "/root/sickofmetal/public/index.php" failed (13: Permission denied), client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", host: "localhost"
Running this: sudo -u www-data cat index.php won't open. cat: index.php: Permission denied
So, while the file "index.php" belongs to user www-data, and this can read and write to the file, why can't it open it via the cat command?
I'd like to update permissions for www-data user to access the file. I'm also, learning as I'm researching on this topic so I'm not sure if I'm getting all of this.