search
HomeCMS TutorialPHPCMSWhat to do if phpcms uploadfile cannot be written

What to do if phpcms uploadfile cannot be written

What should I do if phpcms uploadfile cannot be written?

What to do if phpcms uploadfile cannot be written

1. Change the user and group belonging to 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]#

2. Change /var/ All file permissions in the www/html/phpcms directory are set to 644, and directory permissions are set 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. Check the 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 1月   7 17:23 .
[root@localhost phpcms]# 
[root@localhost phpcms]# ls -lh
总用量 60K
-rw-r--r--.  1 apache apache   48 1月   7 00:46 admin.php
drwxr-xr-x.  3 apache apache 4.0K 1月   7 00:46 api
-rw-r--r--.  1 apache apache  991 1月   7 00:46 api.php
drwxr-xr-x. 17 apache apache 4.0K 1月   7 17:23 caches
-rw-r--r--.  1 apache apache  104 1月   7 00:46 crossdomain.xml
-rw-r--r--.  1 apache apache 3.1K 1月   7 00:46 favicon.ico
drwxr-xr-x.  2 apache apache    6 1月   7 17:20 html
-rw-r--r--.  1 apache apache 8.1K 1月   7 19:53 index.html
-rw-r--r--.  1 apache apache  318 1月   7 00:46 index.php
-rw-r--r--.  1 apache apache  523 1月   7 00:46 js.html
drwxr-xr-x. 10 apache apache 4.0K 1月   7 00:46 phpcms
drwxr-xr-x.  7 apache apache 4.0K 1月   7 00:46 phpsso_server
-rw-r--r--.  1 apache apache 3.6K 1月   7 00:46 plugin.php
-rw-r--r--.  1 apache apache  170 1月   7 00:46 robots.txt
drwxr-xr-x.  6 apache apache   51 1月   7 00:46 statics
drwxr-xr-x.  3 apache apache   19 1月   7 17:20 uploadfile
[root@localhost phpcms]# 
[root@localhost phpcms]#

4. Recheck "File Permission Settings" and it has passed

What to do if phpcms uploadfile cannot be written

PHP Chinese website, a large number of free PHPCMS tutorials, welcome online study!

The above is the detailed content of What to do if phpcms uploadfile cannot be written. For more information, please follow other related articles on the PHP Chinese website!

Statement
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.