问题
Yea I know there are many such question on here. But I think mine is different.
Background: I'm setting up nginx. I'm configuring nginx to use user "nginx", and error log says "/home/ec2-user/MIP/public/js/main.js" failed (13: Permission denied)
Problem: I checked that it's readable by anyone and nginx is the owner:
-rwxrw-r-x 1 nginx nginx 20765 Jul 2 02:26 /home/ec2-user/MIP/public/js/main.js
But permission still denied.
sudo -u nginx cat /home/ec2-user/MIP/public/js/main.js
cat: /home/ec2-user/MIP/public/js/main.js: Permission denied
This itself is already sufficient for it to be accessible by nginx yes? Or user nginx just won't be able to access anything under /home/ec2-user?
来源:https://stackoverflow.com/questions/59143229/permission-denied-when-setting-up-nginx-on-rhel-despite-read-all-access-and-file