Home > Operation and Maintenance > CentOS > How to solve centos unable to upload files

How to solve centos unable to upload files

WJ
Release: 2020-06-04 10:31:07
Original
4722 people have browsed it

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
Copy after login

2. Start vsftp

service vsftpd start
Copy after login

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
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template