I read a lot of installation and configuration tutorials on vsftpd on the Internet and found that many of them are unavailable. After several attempts, I summarized a simple setup method.
Step 1: Install vsftpd
Sudo apt-get installVsftpd
Step 2: Configure
Sudo vi/etc/Vsftpd. Conf
Unregister and disable anonymous access
# Anonymous_enable = YES
Remove logout, # Allow Local Accounts to access, such as root accounts and other system logon accounts
Local_enable = YES
Write_enable = YES
Step 3: If you want the root user to access the server, perform step 3.
Sudo vi/etc/ftpusers
Remove root
Step 4: add an access account
Add an ftpgroup User Group
Sudo groupadd ftpgroup
Add User ftpuser and set its directory to/ftp/ftpuser (this folder can be modified but must be created)
SudoUseradd-G ftpgroup-d/ftp/ftpuser-M ftpuser
If the above/ftp/ftpuser is not created, you need to create this folder
Sudo mkdir/ftp
Sudo mkdir/ftp/ftpuser
Users must have the permission to access and grant/ftp/ftpuser the permission.
Sudo chmod 777/ftp/ftpuser
Step 5: Set the ftpuser Password
Sudo passwd ftpuser
Step 6: restart vsftpd
Sudo restart vsftpd