Home>Article>Operation and Maintenance> How to set up ftp server under centos7
1. Install the vsftpd ftp server software. The command is as follows:
yum install -y vsftpd
2. Set the vsftpd service to start automatically at boot, then restart the service and view ftp Service port, the command is as follows:
#chkconfig vsftpd on #systemctl enabled vsftpd.service #systemctl restart vsftpd.service #netstat -antup|grep ftp
After the installation is completed, you need to restart the vsftpd service.
3. Edit vsftpd main configuration file /etc/vsftpd/vsftpd.conf
Modify anonymous_enable = NO, which will disable anonymous login.
Remove the comment before chroot_local_user = yes to restrict users from accessing places outside the home directory.
4. 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
5. Modify it for others Permissions of the folder: chmod o w /var/www/html/
6. Turn off selinux
vi /etc/selinux/config
Restart the system.
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
7. Turn off the firewall
systemctl stop firewalld.service
Recommended tutorial:centos tutorial
The above is the detailed content of How to set up ftp server under centos7. For more information, please follow other related articles on the PHP Chinese website!