How to configure ftp server under centos7

WJ
Release: 2020-06-06 16:49:38
Original
2980 people have browsed it

How to configure ftp server under centos7

How to configure ftp server under centos7?

The first step is to install the vsftpd ftp server software, yum install -y vsftpd

How to configure ftp server under centos7

The second step is to set the vsftpd service to start automatically at boot, then restart the service and check the ftp service port. The centos6 command is as follows:

#chkconfig vsftpd on
#service vsftpd restart
#netstat -antup|grep ftp
Copy after login

centos7 command is as shown in the figure

How to configure ftp server under centos7

After the installation is complete, restart the vsftpd service, service vsftpd restart

Step 3: Enter the vsftpd main configuration file vi /etc/vsftpd/vsftpd.conf, modify anonymous_enable = NO, this will prohibit anonymous login users from logging in.

At the same time, remove the comment before chroot_local_user = yes to restrict users from accessing places outside the home directory

How to configure ftp server under centos7

How to configure ftp server under centos7

The fourth step is to create an ftp user, set the user to be unable to log in to the server system and the home directory is under /var/www/html:

How to configure ftp server under centos7

##Give others permission to modify the folder:
chmod o w /var/www/html/

How to configure ftp server under centos7

Finally turn off selinux,
vi /etc/selinux/config

How to configure ftp server under centos7

Restart the system ! Or temporarily modify selinux, use setenforce 0, and then restart the vsftpd service. If the selinux service is not turned off, various problems will occur, such as being able to access the server but unable to open directories and files, etc. . .

Try to access it yourself within the system, ftp ip address, you should be able to log in successfully, continue to configure external network access

How to configure ftp server under centos7


Step 5: Turn off the firewall, systemctl stop firewalld.service

How to configure ftp server under centos7#Related reference:

centOS tutorial

The above is the detailed content of How to configure ftp server under centos7. 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!