Configure allow anonymous users to log in to access the VSFTPD service, upload and download documents, create new deletions of documents, and more

Source: Internet
Author: User

  • 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

    1. 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;

    2. Set permissions on directories that allow anonymous user access
      # Mkdir/var/ftp/software #新建可供匿名用户上传下载的文件夹 (optional)
      # chmod O=rwx/var/ftp/software

    3. 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

      1. Basic permissions for documents (folders and files):
        R: Readable
        W: Writable
        X: Executable

      2. 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

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.