yum install -y vsftpd
chkconfig vsftpd on
vi /etc/vsftpd/vftpuser .txt
rpm -qa| grep db4-utils
db_load -T -t hash -f /etc/vsftpd/vftpuser .txt /etc/vsftpd/vftpuser .db
vi /etc/pam .d /vsftpd
useradd -d /home/vftpsite -s /sbin/nologin vftpuser
chmod 700 /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=Welcome to Rekoo FTP server
dirmessage_enable=YES
xferlog_enable=YES
xferlog_file= /var/log/vsftpd .log
xferlog_std_format=YES
idle_session_timeout=600
check_shell=NO
mkdir -p /etc/vsftpd/vsftpd_user_conf
cd /etc/vsftpd/vsftpd_user_conf
vim skyland_ftp
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
chown vftpuser.vftpuser /home/ftpdir
/etc/init .d /vsftpd restart
''
(责任编辑:IT) |