(1)
nginx is run as "http":
$ sudo ps aux| grep nginx
root 10932 0.0 0.1 22264 1340 ? Ss 18:27 0:00 nginx: master process /usr/bin/nginx -g pid /run/nginx.pid; error_log stderr;
http 10933 0.0 0.6 22796 6108 ? S 18:27 0:00 nginx: worker process
user1 10939 0.0 0.2 6672 2680 pts/0 S+ 18:28 0:00 grep nginx
(2)
permissions for the appropriate group:
$ sudo setfacl -m g:http:rwx -R ~/web_apps/my_app1
$ sudo getfacl ~/web_apps/my_app1
# file: home/user1/web_apps/my_app1
# owner: user1
# group: user1
user::rwx
group::r-x
group:http:rwx
mask::rwx
other::r-x
(3)
Yet, when accessed from internet, nginx won't be able to serve any file due to absense of necessary permissions
[error] 10933#10933: *1 open() "/home/user1/web_apps/my_app1/assets/static/favicon.ico"
failed (13: Permission denied),
client: x.x.x.x, server: my_app1.com,
request: "GET /favicon.ico HTTP/2.0",
host: "my_app1.com",
referrer: "https://my_app1.com/assets/static/fdsafdsafds"
What's the matter?