first open the FTP port
Install vsftp using the Apt-get command
#apt-get Install Vsftpd-y
Add FTP Account and directory
Check the position of the nologin first, usually under/usr/sbin/nologin or/sbin/nologin.
Create an account using the following command, which specifies the home directory where/alidata/www/wwwroot is the user pwftp, and you can define your account name and directory yourself:
#useradd-D/alidata/www/wwwroot-s/sbin/nologin pwftp
To modify this account password:
#passwd pwftp
Modify permissions for the specified directory
#chown-R Pwftp.pwftp/alidata/www/wwwroot
Configure VSFTP
Edit the Vsftp configuration file with the following command:
#vi/etc/vsftpd.conf
Change "Anonymous_enable=yes" in the configuration file to "Anonymous_enable=no"
Remove the comment symbol before the following configuration:
Local_enable=yes
Write_enable=yes
Chroot_local_user=yes
Chroot_list_enable=yes
Chroot_list_file=/etc/vsftpd.chroot_list
Save exit
Edit the/etc/vsftpd.chroot_list file, add the FTP account name, save the exit
Modify Shell Configuration
VI Edit/etc/shells, if there is no/usr/sbin/nologin or/sbin/nologin in the file (depending on the current system configuration) is appended
Restart the VSFTP service and test the login
To start the VSFTP service with a command:
#service vsftpd Restart
Ubuntu install vsftp software (tested)