vsftpd 安装配置
安装
yum install -y vsftpd
配置
新建用户
useradd vsftpdusername
passwd vsftpusername
根目录
mkdir /ftpdir/www
chmod -R 755 /ftpdir
chmod -R 777 /ftpdir/www
配置文件
vi /etc/vsftpd/vsftpd.conf
anonymous_enable=YES local_enable=YES write_enable=YES local_umask=022 dirmessage_enable=YES xferlog_enable=YES connect_from_port_20=YES xferlog_file=/var/log/xferlog xferlog_std_format=YES ascii_upload_enable=YES ascii_download_enable=YES listen=YES pam_service_name=vsftpd userlist_enable=NO tcp_wrappers=YES guest_enable=YES guest_username=ftp user_config_dir=/etc/vsftpd/user_conf pasv_enable=YES pasv_min_port=40000 pasv_max_port=40080 pasv_promiscuous=YES
vi /etc/vsftpd/user_password.txt
ftpusername
ftpuserpassword
db_load -T -t hash -f /etc/vsftpd/user_passwd.txt /etc/vsftpd/user_passwd.db
vi /etc/pam.d/vsftpd
增加两行
auth required /lib64/security/pam_userdb.so db=/etc/vsftpd/user_password
account required /lib64/security/pam_userdb.so db=/etc/vsftpd/user_password
service vsftpd restart
浙公网安备 33010602011771号