nginx file permissions issue

PHP中文网
Release: 2016-08-31 08:54:52
Original
1830 people have browsed it


centos + lnmp
Use PHP to write to the test folder. The permission setting is not 766. It must be 777?

nginx runs as user www, and the folder belongs to user root

Reply content:

centos + lnmp
Use PHP to write to the test folder. The permission setting is not 766, must it be 777?

nginx runs as user www, and the folder belongs to user root

0666 is fine, 0777 just has more execution rights
If you give write and execution permissions at the same time, it should be very dangerous.

The main reason: the directory requires WX permissions, and the file requires W permissions

Please check what is your Nginx user? What is the php user? Does the nginx user have permissions to the directory you want to write?

That’s it nginx file permission issues, please pay attention to the PHP Chinese website (www.php.cn) for more related content!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
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!