Ubuntu16.04 installs ftp to set anonymous user login, and folder permission issues

On the problem of installing ftp on ubutu16.04

1 install svn

 sudo apt-get install vsftpd

2 Create a directory for storing ftp files

mkdir /home/ftp/
cd /home/ftp/ 
mkdir images && mkdir videos  
chmod 777 images 
chmod 777 videos 

Note: The root directory name is ftp, and this directory cannot be written, otherwise the ftp service cannot be started. Create a directory in which you can specify the appropriate permissions. If you need to upload, you can specify writable permissions.

3 Change the configuration file

Backup before changing

1 Open the configuration file

sudo vim /etc/vsftpd.conf 

2 Modify the file

# 允许匿名访问
anonymous_enable=YES

# 开放本地用户的写权限
write_enable=YES

# 匿名上传
anon_upload_enable=YES

# 允许匿名创建文件夹
anon_mkdir_write_enable=YES

# 开放重命名,删除文件等权限,不开的话没法续传。
anon_other_write_enable=YES

# 设置匿名用户上传的文件的生成掩码,默认为077
anon_umask=000

anon_world_readable_only=YES
dirmessage_enable=YES

# 设置ftp根目录
anon_root=/home/ftp

# 取消密码
no_anon_password=YES

It can be compared with the configuration file, if there is one, it can be changed, if not, it can be added

4 restart ftp

sudo service vsftpd restart

Guess you like

Origin blog.csdn.net/xin_IT_able/article/details/102841096