Version: Vsftpd-3.0.2-9.el7.x86_64 (CentOS is 64-bit).
1. Installing VSFTPD
Yum Install vsftpd
2. Configure VSFTPD
Back up the original configuration file before modifying the configuration:
CP /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.conf.backup
To modify a configuration file:
Vim/etc/vsftpd/vsftpd.conf
Where to modify :
1) Remove the comment at the beginning of the following to restrict all users from switching to a different directory
Chroot_local_user=yes
2) allow the root directory to be writable
Allow_writeable_chroot=yes
There are two modes of working with FTP, one is passive mode and the other is active mode, here we use Active mode:
At the end of the file, add:
Port_enable=yes
If you want to use passive mode, configure the following:
pasv_enable=yespasv_min_port=40000 The upper bounds of the #pasv连接模式时可以使用port range, 0 means any pasv_max_port=40100 # The lower bound of the port range can be used when PASV connection mode.
3. Restart the service
Systemctl Restart VSFTPD
Set up the VSFTPD service after booting from:
Systemctl Enable VSFTPD
4. Create a user
useradd-d/ftp image-s/sbin/nologin
Where-d specifies the directory when the user logs on,-s specifies the shell to use after the user logs in, and then sets the password
passwd
Finally give/FTP authorization:
chmod 755 /FTP
Description: Because the firewall and SELinux were previously closed, no additional setup is required here.
CentOS Installation VSFTPD