Centos安装vsftp

分类:CentOS教程 阅读:83340 次

yuminstall-yvsftpd chkconfigvsftpdon vi/etc/vsftpd/vftpuser.txt #vpnuser #vpnpwd rpm-qa|grepdb4-utils db_load-T-thash-f/etc/vsftpd/vftpuser.txt/etc/vsftpd/vftpuser.db vi/etc/pam.d/vsftpd #authrequired/lib64/security/pam_userdb.sodb=/etc/vsftpd/vftpuser #accountrequired/lib64/security/pam_userdb.sodb=/etc/vsftpd/vftpuser useradd-d/home/vftpsite-s/sbin/nologinvftpuser chmod700/home/vftpsite vi/etc/vsftpd/vsftpd.conf ############ listen=YES listen_port=12580 connect_from_port_20=YES ftp_data_port=20 pasv_enable=YES pasv_min_port=30000 pasv_max_port=30999 tcp_wrappers=YES local_enable=YES chroot_local_user=yes anonymous_enable=NO guest_enable=YES guest_username=vftpuser user_config_dir=/etc/vsftpd/vsftpd_user_conf pam_service_name=/etc/pam.d/vsftpd ftpd_banner=WelcometoRekooFTPserver dirmessage_enable=YES xferlog_enable=YES xferlog_file=/var/log/vsftpd.log xferlog_std_format=YES idle_session_timeout=600 check_shell=NO ######end####### mkdir-p/etc/vsftpd/vsftpd_user_conf cd/etc/vsftpd/vsftpd_user_conf vimskyland_ftp####注意:此文件名与/etc/vsftpd/vftpuser.txt中的vpnuser需一致 ################# local_root=/home/ftpdir virtual_use_local_privs=NO write_enable=YES anon_world_readable_only=NO anon_upload_enable=YES anon_other_write_enable=YES anon_mkdir_write_enable=YES anon_umask=0022 chmod_enable=YES file_open_mode=0775 ########end############# chownvftpuser.vftpuser/home/ftpdir###授权ftp目录 /etc/init.d/vsftpdrestart ##注意检查pam_userdb.so的全路径修改/etc/pam.d/vsftpd中,跟全路径一致 #find/-name"pam_userdb.so" #vim/etc/pam.d/vsftpd #servicevsftpdrestart