[root@itdragon ~]# useradd ftpuser
[root@itdragon ~]# passwd ftpuser
Changing password for user ftpuser.
New password:
BAD PASSWORD: it is too short
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.
[root@itdragon ~]# yum -y install vsftpd
[root@itdragon ~]# ifconfig
[root@itdragon ~]# vim /etc/vsftpd/vsftpd.conf
anonymous_enable=NO
pasv_min_port=30000
pasv_max_port=31000
[root@itdragon ~]# service vsftpd restart
[root@itdragon ~]# vim /etc/sysconfig/iptables
-A INPUT -p tcp -m multiport --dport 20,21 -m state --state NEW -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT
-A INPUT -p tcp --dport 30000:31000 -j ACCEPT
[root@itdragon ~]# service iptables restart
[root@itdragon ~]# getsebool -a | grep ftp
allow_ftpd_anon_write --> off
allow_ftpd_full_access --> off
allow_ftpd_use_cifs --> off
allow_ftpd_use_nfs --> off
ftp_home_dir --> off
ftpd_connect_db --> off
ftpd_use_fusefs --> off
ftpd_use_passive_mode --> off
httpd_enable_ftp_server --> off
tftp_anon_write --> off
tftp_use_cifs --> off
tftp_use_nfs --> off
[root@itdragon ~]# setsebool -P allow_ftpd_full_access on
[root@itdragon ~]# setsebool -P ftp_home_dir on
临时关闭防火墙不过瘾,直接永久关闭防火墙
[root@itdragon modprobe.d]# service iptables stop
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
[root@itdragon modprobe.d]# chkconfig iptables off