(1), first use the command to check whether vsftpd is installed
vsftpd -version
If it is not installed, install it with the following command
sudo apt-get install vsftpd
After the installation is complete, enter the vsftpd -version command again to check whether the installation is successful
(2), create a new folder for the working directory of FTP
sudo mkdir /home/ftp
(3), create a new FTP user and set a password and the working directory
ftpname is the username you created for the ftp
sudo useradd -d /home/ftp -s /bin/bash ftpname
Set a password for the newly created user
passwd ftpname
(4), modify the vsftpd configuration file
and use the command to open vsftpd.conf
vi vsftpd.conf
Set the attribute value
anonymous_enable=NO #Prohibit anonymous access
local_enable=YES
write_enable=YES
input: wq save and return
(5), start the vsftpd service
service vsftpd start
(6) Use netstat -ntulp to see if the server's listening port has port 21
(7), in the resource manager, or the ftp server in the browser, enter the account number and password to log in
PS : If you use wiuSCP to log in, you will be prompted with an error message when logging in
The error message is as follows: "Timeout detected! (Data connection) Failed to get directory listing. Error listing directory entry for '/tmp'."
Please change the ftp mode of winSCP, if it is passive, please change it to active, if it is active, please change it to passive.
The following link can help you debug the above error: http://www.spliu.cn/2017/08/13/ubuntu%e6%90%ad%e5%bb%baftp%e5%90%8e%ef%bc%8cwinscp %e8%bf%9e%e6%8e%a5%e6%8a%a5%e9%94%99%e4%b8%ba%e5%88%97%e5%87%bahomeftp%e7%9a%84%e7 %9b%ae%e5%bd%95%e9%a1%b9%e6%97%b6%e5%87%ba%e9%94%99/