sudo apt-get install vsftpd
The ftp configuration file is in
/etc/vsftpd.conf
You can use the following commands to open, close and restart the ftp service
sudo /etc/init.d/vsftpd start
sudo /etc/init.d/vsftpd stop
sudo /etc/init.d/vsftpd restart
Use the following commands to see that there are more ftp user groups and ftp users in the system
cat /etc/group
cat /etc/passwd
The directory location of the ftp server is /srv/ftp, which is also the root directory for anonymous users to access.
This indicates that the ftp service has been enabled, but anonymous login has not been enabled.
Configure vsftpd.conf
Edit the /etc/vsftpd.conf file:
// 允许匿名用户登录
anonymous_enable=YES
// 允许本地用户登录
local_enable=YES
// 开启全局上传
write_enable=YES
// 允许匿名用户上传文件
anon_upload_enable=YES
// 充许匿名用户新建文件夹
anon_mkdir_write_enable=YES
Anonymous user login
Create pub under /srv/ftp for files uploaded by anonymous users and change their permissions
cd /srv/ftp
sudo mkdir pub
sudo chown ftp:ftp pub