How does nginx's www-data user access other users' files?
仅有的幸福
仅有的幸福 2017-05-16 17:23:34
0
1
929

In the ubuntu server environment, nginx is installed.
In nginx.conf, the default value of the "user" node is "www-data". That is, owned by the www-data user.
The html file of my website is under another user nguser, and the directory is /home/nguser/website

Now I changed the "root" in nginx.conf to /home/nguser/website, and a 404 error occurred while browsing.
Someone told me that this is a permissions issue, saying that the www-data user cannot access the content of the nguser user.

I am a beginner in linux and nginx. I don’t know how to solve this problem. Please give me an answer!

仅有的幸福
仅有的幸福

reply all(1)
Ty80

chmod -R 777 /home/nguser/website

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!