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 uploadfile is not writable in phpcms

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Editor to share with you how to solve the problem of uploadfile can not be written in phpcms, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

What if phpcms uploadfile is not writable?

1. Modify the users and groups of the / var/www/html/phpcms directory to apache

[root@localhost html] # [root@localhost html] # pwd/var/www/html [root@localhost html] # ls index.php itop phpcms [root@localhost html] # [root@localhost html] # chown-R apache:apache phpcms/ [root@localhost html] # [root@localhost html] #

two。 Set all file permissions in the / var/www/html/phpcms directory to 644 and directory permissions to 755

[root@localhost html] # [root@localhost html] # find phpcms/*-type f-exec chmod 644 {}\; [root@localhost html] # find phpcms/*-type d-exec chmod 755 {}\; [root@localhost html]

3. View directory and file permission information under / var/www/html/phpcms

[root@localhost html] # [root@localhost html] # cd phpcms/ [root@localhost phpcms] # ls-lhd drwxr-xr-x. 9 apache apache 4.0K January 7 17:23. [root@localhost phpcms] # [root@localhost phpcms] # ls-lh total dosage 60K Murray RWMI. 1 apache apache 48 January 7 00:46 admin.phpdrwxr-xr-x. 3 apache apache 4.0K January 7 00:46 api-rw-r--r--. 1 apache apache 991 January 7 00:46 api.phpdrwxr-xr-x. 17 apache apache 4.0K January 7 17:23 caches-rw-r--r--. 1 apache apache 104 January 7 00:46 crossdomain.xml-rw-r--r--. 1 apache apache 3.1K January 7 00:46 favicon.icodrwxr-xr-x. 2 apache apache 6 January 7 17:20 html-rw-r--r--. 1 apache apache 8.1K January 7 19:53 index.html-rw-r--r--. 1 apache apache 318 January 7 00:46 index.php-rw-r--r--. 1 apache apache 523 January 7 00:46 js.htmldrwxr-xr-x. 10 apache apache 4.0K January 7 00:46 phpcmsdrwxr-xr-x. 7 apache apache 4.0K January 7 00:46 phpsso_server-rw-r--r--. 1 apache apache 3.6K January 7 00:46 plugin.php-rw-r--r--. 1 apache apache 170 January 7 00:46 robots.txtdrwxr-xr-x. 6 apache apache 51 January 7 00:46 staticsdrwxr-xr-x. 3 apache apache 19 January 7 17:20 uploadfile [root@localhost phpcms] # [root@localhost phpcms] #

4. Re-detect File permission Settings, passed

The above is all the content on how to solve the unwritable problem of uploadfile in phpcms. 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

Servers

Wechat

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

12
Report