Permission denied when setting up nginx on RHEL despite read-all access and file ownership

此生再无相见时 提交于 2019-12-13 04:17:38

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!