Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem that php is not writable in linux

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly shows you "how to solve the problem of php unwritable in linux", which is easy to understand and clear. I hope it can help you solve your doubts. Let me lead you to study and learn this article "how to solve the problem of php unwritable in linux".

Linux php is not writable because Application directory users and groups are not set correctly. The solution is: 1, modify users and groups; 2, modify the permissions of other users to be writable and readable.

This article operating environment: Windows7 system, PHP5.6 version, DELL G3 computer.

Unwritable problem of running php directory on linux

The reason is that the default user and group of apache (httpd) is daemon.

The default user for nginx is nginx

Application directory users and groups are not set up correctly!

Resolve:

one。 Modify users and groups (recommended)

two。 Modify the permissions of other users to be writable and readable

Example: upload a thinkphp that is not writable when running the generated application directory for the first time

The application directory [. / Application/] is not writable and cannot be generated automatically!

Please generate the project directory manually ~

As shown in the figure:

View the Application properties as follows:

Ls-l

View httpd users and groups

Phpinfo (); print information search 'User/Group'

Apache View httpd.conf

Nginx View nginx.conf

You can modify it accordingly, for example, I currently start apache, and I change the project to daemon user and daemon group.

Chown-R daemon:daemon shopping/

View:

Visit:

I will delete the relevant files just generated, change the users and groups from daemon to root, and solve the problem by changing the file permissions:

Recurring problems:

Access: Port 82 I equipped with nginx

Chmod 777R.

The above is all the contents of this article entitled "how to solve the unwritable problem of php in linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report