sudo db4.6_load -T -t hash -f logins.txt /etc/vsftpd_login.db
vsftpd更新web目录配置实例:
root@ubuntu:~# cat /etc/vsftpd.conf
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=www-data
listen=YES
listen_port=20021
pasv_min_port=30000
pasv_max_port=30099
pam_service_name=ftp
user_config_dir=/etc/vsftpd_user_conf
pasv_promiscuous=YESport_promiscuous=YESaccept_timeout=60
connect_timeout=60
data_connection_timeout=600
root@ubuntu:~# cat /etc/vsftpd_user_conf/user1
anon_world_readable_only=NO
write_enable=YES
anon_upload_enable=YES
anon_mkdir_write_enable=YES
anon_other_write_enable=YES
anon_umask=022权限设置:
root@ubuntu:~# ls -l /home/web/alpha/app
total 20
drwxr-xr-x 3 www-data www-data 4096 2010-05-31 17:05 admin
drwxr-xr-x 3 www-data www-data 4096 2010-05-28 17:29 etc
drwxr-xr-x 6 www-data www-data 4096 2010-05-18 11:55 htdocs
drwxr-xr-x 4 www-data www-data 4096 2010-05-17 11:51 lib
drwxr-xr-x 7 www-data www-data 4096 2010-05-17 17:32 usr
添加iptables规则:/sbin/iptables -A INPUT -p tcp --dport 30000:30099 -j ACCEPT
/sbin/iptables -A INPUT -p tcp -m tcp --dport 21 -j ACCEPT
阅读(215) | 评论(0) | 转发(0) |