linux php cannot be written because the user and group of the Application directory are not set correctly. The solution is: 1. Modify the user and group; 2. Modify the permissions of other users to be writable and readable.
The operating environment of this article: Windows 7 system, PHP version 5.6, DELL G3 computer.
How to solve the problem that linux php is not writable?
The directory running php on linux is not writable
The reason is apache ( The default user and group of httpd) are both daemon
The default user of nginx is nginx
Application directory user and group are not set correctly!
Solution:
1. Modify the user and group (recommendation)
2. Modify the permissions of other users to writable Read
Example: When uploading a thinkphp and running it for the first time to generate the application directory, it prompts that it is not writable
The application directory [./Application/] is not writable, and the directory cannot be automatically generated!
Please generate the project directory manually~
As shown:
Check Application attributes are as follows:
ls -l
User/Group'
##nginx View nginx.conf
Just modify it accordingly. For example, I am currently starting apache, and I changed the project to daemon user and daemon group
chown -R daemon:daemon shopping/
Visit:
I will delete the relevant files just generated and delete the user Change the group from daemon to root, and solve it by changing file permissions:
Access: I configure port 82 nginx
chmod 777 -R .
##/END
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of How to solve the problem that linux php cannot be written. For more information, please follow other related articles on the PHP Chinese website!