Vsftp virtual user configuration different permissions under Linux

  
        

RHEL5.5 VSFTP2.0.5 virtual user configuration different permissions

linux use vsftp to build ftp server, create a virtual account at the same time, assign different permissions for different accounts, the following configuration test passed.

  1. System version




    2.vsftpd version



    If the vsftpd service is not installed during system installation, you can install it later via yum or manually using rpm package and tarball. The specific installation process is not explained here. After the installation is complete, View the service status of vsftpd

    3.Configure the vsftpd.conf file

    Back up before modification


    Modify the following configuration file

    Close anonymous login

    Open ascii upload and download function


    Add the following lines at the end of the configuration file, meaning that virtual users can be logged in, corresponding to virtual users. For the ftp account, the configuration file directory for the virtual user login is /etc/vsftpd/users/, and the configuration files for different users are stored under this directory.



    The value of pam_service_name in the first line here needs to be the same as the name of the authentication file in the sixth step, otherwise the authentication is unsuccessful. The last line here is configured with the virtual user's directory, which needs to be the same as the directory of the eighth step;


    4. Create a virtual user's account file


    Add a virtual account in the vm_user.txt file

    where the odd-numbered user name, the even-numbered behavior corresponding to the password

    5. Use the above file to generate the database file


    Use vm_user.txt to generate vm_user.db file


    Modify database file permissions to 600

    6. Modify ftp authentication file to just generate Database file


    Enter the following:


    The file name that follows must be the same as the file name created earlier, otherwise it fails

    7. Set the directory of the virtual user ftp and set the access permissions of the ftp user directory



    [root@vsftp vsftpd]#chgrp ftp -R /Var/ftp


    8. Configuring the virtual user's account directory


    Configuring the directory of the ws6l account and creating the account configuration file


    The ws6l account only has the right to download, no upload, new folder , delete the permissions of the file;

    9. Create the ftp directory of the ws6l account


    At this point, the first virtual account is created successfully, and the verification is omitted here.

    10. After the configuration is completed, it is found that there are still a few accounts, you need to re-create the account upload account, only upload permissions, create an admin account, have all permissions:

    in the vm_user.txt file Add these two accounts



    Regenerate the database file



    Create the user's profile



    Because the upload account and admin account need to see the root directory of all users, upload is responsible for completing the upload work, but does not have the right to download, delete, etc., admin account , with all permissions, so you do not need to re-establish ftp directory, you can directly specify var /ftp, all the configuration is completed, you can test, the test process is not detailed, the test is successful

    If you encounter problems during the configuration process, you can send an email to [email protected] to communicate, I wish you all a happy learning!

    This article comes from “One Net World” Blog, please be sure to keep this source http://2646213.blog.51cto.com/2636213/1683898

Copyright © Windows knowledge All Rights Reserved