Install VSFTPD
Yum-y Install VSFTPD
setting up the power-on self-starter
Systemctl Enable Vsftpd.service
Backup Configuration
Cp/etc/vsftpd/vsftpd.conf/etc/vsftpd/vsftpd.conf-bak
Edit Configuration
Sed-i "s/anonymous_enable=yes/anonymous_enable=no/g" '/etc/vsftpd/vsftpd.conf '
//disable anonymous user login
sed-i ' s/# Chroot_local_user=yes/chroot_local_user=yes/g "'/etc/vsftpd/vsftpd.conf '
//Prohibit anonymous user login
echo-e" Allow_ Writeable_chroot=yes\npasv_enable=no ">>/etc/vsftpd/vsftpd.conf
//Limit all users to the home directory (yes/no), use active mode only
Create an FTP user
useradd-d/home/wwwroot-g ftp-s/sbin/nologin username *
* Add user and set home directory to/home/wwwroot and disable login system
* If you want to modify the home directory to execute the following statement:
* usermod-d Directory custom username/
mkdir/home/wwwroot
//Create/home/wwwroot
chmod-r 777/home/wwwroot
/ /Modify directory Permissions
passwd username
//Enter two times the password you want to set
Restart the VSFTP service
Service VSFTPD Restart
commands that might be used
To review enabled configurations
Start the VSFTP service
Service VSFTPD Start
Stop VSFTP Service
Service VSFTPD Stop
Delete User
Userdel Custom user Name
Delete directory and directory files
RM-RF Directory
*
* rm-rf/home/wwwroot/* *
deleting files
Rm-f file Path
* * rm-f/home/wwwroot/xxx.log * *
Summary
After several hours of tossing, it was OK.
Online tutorials ... Do not know whether they have actually tried, all kinds of errors, can not connect or upload files.
Write down the record here to avoid the same mistakes in the future