Home>Article>Operation and Maintenance> 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
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
centos7 command is as shown in the figure
After the installation is complete, restart the vsftpd service,service vsftpd restart
Step 3: Enter the vsftpd main configuration filevi /etc/vsftpd/vsftpd.conf
, modifyanonymous_enable = NO
, this will prohibit anonymous login users from logging in.
At the same time, remove the comment beforechroot_local_user = yes
to restrict users from accessing places outside the home directory
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:
##Give others permission to modify the folder:
chmod o w /var/www/html/
Finally turn off selinux,
vi /etc/selinux/config
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
Step 5: Turn off the firewall, systemctl stop firewalld.service
#Related reference:
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!