Reliable vsftpd configuration

Source: Internet
Author: User
Reliable vsftpd configuration function description: 1. multiple site directories on the server Prohibit anonymous users from accessing. the system account prohibits access to the FTP service. 3. each account is restricted to the specified home directory, and multiple accounts are mapped to the system account FTP. these accounts cannot be used to log on to the system.... reliable vsftpd configuration function description: 1. multiple site directories on the server Prohibit anonymous users from accessing. the system account prohibits access to the FTP service. 3. each account is restricted to the specified home directory, and multiple accounts are mapped to the system account FTP. these accounts cannot be used to log on to the system. the owner of the uploaded file is ftp, the permission is 644, and the permission for creating a new directory is 655. use the passive mode to ensure that the client can transmit files normally in the NAT environment. 6. the server enables the iptables firewall, and the range of the passive mode data transmission port is limited to-some pre-processing. disable selinux, edit the file/etc/selinux/config, and modify SELINUX = disabled B. install vsftpdyum install vsftpd. configure vsftpd as follows. edit/etc/vsftpd. conf outputs the following content: Consumer = NOlocal_enable = NOwrite_enable = YESlocal_umask = Consumer = NOchmod_enable = Consumer = YESlocal_enable = Consumer = YES listen = Consumer = YESport_enable = Consumer = vsftpdtcp_wrappers = YESguest_enable = YESguest_username = ftpuser_config_dir =/etc/vsftpd/users/virtual_use_local_privs = YES 2. generate the user account file and create the file/etc/vsftpd/logins.txt. the format is as follows: username1password1psername2password2: Odd behavior Username. install a software package with the password corresponding to the even behavior, convert the preceding file to the database information yum install db4 * to generate the account database db_load-T hash-f/etc/vsftpd/logins.txt/etc/vsftpd/logins. db, which will generate the file/etc/vsftpd/logins. db 3. edit the/etc/pam file. d/vsftpd, delete other content enter auth required pam_userdb.so db =/etc/vsftpd/logins account required pam_userdb.so db =/etc/vsftpd/logins note that the specified db file cannot contain suffix 4. create the configuration file/etc/vsftpd/users/username1 for each user and enter the following content: local_root =/data/wwwroot/anon_upload_enable = YES anon_mkdir_write_enable = YES enabled = YES: make sure that the owner of the/data/wwwroot/directory is an ftp account. because we have enabled the iptables firewall, we need to open the corresponding port 21 5000-5100, add iptables rules to iptables-a input-p tcp -- dport 21-j ACCEPT iptables-a input-p tcp -- dport 5000: 5100-j ACCEPT. Tip: to ensure security, make sure that only the authorized IP address can access the ftp server to add A new account:. edit the/etc/vsftpd/logins.txt file and add the account password B. update the database file db_load-T-t hash-f/etc/vsftpd/logins.txt/etc/vsftpd/logins. dbC. create a configuration file for the user. the file name is the same as the user name/etc/vsftpd/users/username. the content is roughly as follows: local_root =/data/wwwroot/anon_upload_enable = YES anon_mkdir_write_enable
Related Article

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.