Centos5.664-bit compilation installation vsftpd-2.3.4 and configuration
Source: Internet
Author: User
Centos5.6 (64bit) compiler installation vsftpd-2.3.4 configuration (two types of user login) Virtual User login is more secure than local user login. Because a vsftpd virtual user is not a system account, it is only used to support the Vsftpd service. Therefore, it is not necessary to allow him to log on to the system, this is more secure than setting the logon account of a local user as the logon system. I. key points of the article:
Virtual User configuration using PAM data in a 1.64-bit system
2. the key script is successfully compiled. Necessary steps: detailed installation and configuration instructions.
3. full configuration instance, Centos5.6 build and install vsftpd-2.3.4 (configure local user login, Virtual User login)
Download
Wget http://xiazai.xiazaiba.com/Soft/V/vsftpd-2.3.4.tar.gz
Tar xzvf vsftpd-2.3.4.tar.gz
Cd vsftpd-2.3.4
Key steps: Because the SO file path of the 64-bit system changes, you must change the vsf_findlibs.sh script to change lib to lib64.
It can be manually modified or modified in batches.
Sed-I's/lib \ // lib64 \ // g' vsf_findlibs.sh will not be executed here. in a 64-bit system, make will fail.
Mkdir/var/ftp/
Useradd-d/var/ftp
Chown root. root/var/ftp/
Chmod og-w/var/ftp/
Make
Make install
Cd/etc/
Cp/etc/vsftpd. conf. rpmsave vsftpd. conf
II. detailed installation and configuration instructions:1. first install PAMyum install pam-devel db4-utils2, install vsftpdyum install vsftpd *
3. check whether pamldd/usr/sbin/vsftpd is loaded in vsftpd. if ibpam is displayed in the output. so.0 =>/lib/libpam.so.0, success 4. Generate user verification data warehouse file 1)create loguser.txt in the following format (user, password, user, password .....) userid
Pass2) after saving, use db_load-T-t hash-f loguser.txt/etc/vsftpd/vsftpd_login.db, check whether the files in this directory generate the access permission chmod 600/etc/vsftpd_login.db5, vim/etc/pam. d/vsftpd add the following line in the header auth required/lib/security/pam_userdb.so db =/etc/vsftpd/vsftpd_login
Account required/lib/security/pam_userdb.so db =/etc/vsftpd/vsftpd_login note: If it is a 64-bit operating system, the path here should be changed to auth required/lib64/security/pam_userdb.so db =/etc/vsftpd/vsftpd_login
Account required/lib64/security/pam_userdb.so db =/etc/vsftpd/vsftpd_login. otherwise, after vsftpd is started, Error 530 will be reported. this error, previously, similar instruction files on other websites did not indicate this issue. comment out other content. 6. vim/etc/vsftpd. conf to ensure that the following settings are included: anonymous_enable = NO
Local_enable = YES
Write_enable = NO
Anon_upload_enable = NO
Anon_mkdir_write_enable = NO
Anon_other_write_enable = NO
Chroot_local_user = YES
Guest_enable = YES
Guest_username = virtual // --- local user mapped here
Listen = YES
Listen_port = 21
Pasv_min_port = 30000
Pasv_max_port = 309997, start vsftpd
3. fully configure the instance Centos5.6 build and install vsftpd-2.3.4 (configure local user login) wget http://xiazai.xiazaiba.com/Soft/V/vsftpd-2.3.4.tar.gztar zxvf vsftpd-2.3.4.tar.gz
Cd vsftpd-2.3.4mkdir-p/usr/local/man/man8
Mkdir-p/usr/local/man/man5make & make install
Cd ../vim/etc/vsftpd. confmkdir/etc/vsftpd
Touch/etc/vsftpd/chroot_list
Echo "/usr/local/sbin/vsftpd &">/etc/rc. local
Mkdir/var/ftp
Touch/etc/vsftpd/userlist. chroot
Touch/etc/vsftpd/userlist_deny.chroot
Touch/var/log/vsftpd. log
Mkdir-p/usr/share/empty # firewall selinux settings
/Usr/local/sbin/vsftpd &
Setsebool-P ftpd_disable_trans on
/Sbin/iptables-I INPUT-p tcp -- dport 21-j ACCEPT
/Etc/rc. d/init. d/iptables save
/Etc/init. d/iptables restart
Useradd-d/home/wwwroot-s/sbin/nologin adminftp
Pkill vsftpd
/Usr/local/sbin/vsftpd & remember to set the adminftp password
Command: passwd adminftp and enter the new password twice
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