rootになる。
インストール
yum -y install vsftpd
設定
cd /etc/vsftpd/
cp -prf vsftpd.conf vsftpd.conf.org
vi vsftpd.conf
下記のように設定する。
anonymous_enable=NO
ascii_upload_enable=YES
ascii_download_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list
ls_recurse_enable=YES
ユーザ追加
echo "yamato" >> /etc/vsftpd/chroot_list
IPアドレス制限
echo "vsftpd:ALL" >> /etc/hosts.deny
echo "vsftpd:ALL" >> /etc/hosts.allow
iptablesの設定
iptables -vnL
vi /etc/sysconfig/iptables
-A INPUT -p tcp -m tcp --dport 20 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 21 -j ACCEPT
/etc/init.d/iptables restart
SELinux
setenforce 0
起動
/etc/rc.d/init.d/vsftpd restart