Home > Article > Operation and Maintenance > How to solve centos unable to upload files
How to solve the problem that centos cannot upload files?
Using yum to build the ftp service. .
Windows uses FileZilla to connect to linux ftp. What is more depressing is the upload problem. I spent half an afternoon working on it without success, and I finally solved it just now. . Let’s talk about the ideas below:
1. Install vsftp
yum install vsftp
2. Start vsftp
service vsftpd start
Although it can be started correctly, it basically follows the default configuration, and anonymous login is not possible. The
of the uploaded files and folders are:
vim /etc/vsftpd/vsftpd.conf
The result content, marked The red area indicates the permissions that allow anonymous uploading of files and folders. Restart the vsftpd service. .
Although there is no problem with the configuration, I still cannot upload files, and the problem still reported is permissions. .
After searching, it turns out that selinux needs to be shut down:
Modifyvim /etc/selinux/config
The above method disables the selinux service, which is required Restart the computer. Of course, there is a temporary disablement, and you also need to set the permissions of the root folder of ftp:
chmod 777 -R /usr/share/nginx/html
After the settings are completed, you can finally upload files. . . . Of course, you need to upload it to the pub folder. .
Related reference: centOS tutorial
The above is the detailed content of How to solve centos unable to upload files. For more information, please follow other related articles on the PHP Chinese website!