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
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!