This is verified under the CENTOS7 version system.
In general, anonymous users of the upload and download, the user is used by the FTP user permissions, to upload files, you need to FTP users have W permissions to the file, to download, you need the FTP user has r permission to the file.
Steps
Modify configuration file vsftpd.conf (configure as needed)
# vim/etc/vsftpd/vsftpd.conf
Anonymous_enable=yes #是否允许匿名用户登录
Write_enable=yes #enable Any form of FTP write command
Anon_upload_enable=yes #是否允许匿名用户上传文件
Anon_mkdir_write_enable=yes #是否允许匿名用户创建目录
Anon_other_write_enable=yes #是否允许匿名用户删除, renaming, etc.
anon_umask=022 #权限掩码, the default permission mask when an anonymous user uploads a document, the folder permission is 777-022=755, the general file permission is 666-022=644, and the defaults the mask is 077, the file after the anonymous user uploads The folder permission is 700, and the file's permission is 600.
Anon_world_readable_only=yes #当为YES时, the other user of the file must have R permission to allow the download, even if the owner of the file is FTP and the file has R permissions can not be downloaded, for security reasons, the default is YES, when no, then as long as the owner FTP and the file has R permission can be downloaded;
Set permissions on directories that allow anonymous user access
# Mkdir/var/ftp/software #新建可供匿名用户上传下载的文件夹 (optional)
# chmod O=rwx/var/ftp/software
Care to avoid the impact of SELinux on user access
Modify the Sebool value
# setsebool-p Ftpd_anon_write on
Modifying the security context
# chcon-t Public_content_rw_t/var/ftp/software/
Trouble with these settings, you can simply shut down SELinux
# Setenforce 0
Add
Basic permissions for documents (folders and files):
R: Readable
W: Writable
X: Executable
Attribution of documents (folders and files):
Owner
Genus Group
The others
Configure allow anonymous users to log in to access the VSFTPD service, upload and download documents, create new deletions of documents, and more