● vsftp 3.0.2 설치
# yum install -y vsftpd # cp -av /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.conf.original # sed -i 's/anonymous_enable=YES/anonymous_enable=NO/' /etc/vsftpd/vsftpd.conf # sed -i 's/#ascii_upload_enable=YES/ascii_upload_enable=YES/' /etc/vsftpd/vsftpd.conf # sed -i 's/#ascii_download_enable=YES/ascii_download_enable=YES/' /etc/vsftpd/vsftpd.conf # sed -i 's/#chroot_local_user=YES/chroot_local_user=YES/' /etc/vsftpd/vsftpd.conf # sed -i 's/#chroot_list_enable=YES/chroot_list_enable=YES/' /etc/vsftpd/vsftpd.conf # sed -i 's/#chroot_list_file=\/etc\/vsftpd\/chroot_list/chroot_list_file=\/etc\/vsftpd\/chroot_list/' /etc/vsftpd/vsftpd.conf # sed -i 's/#ls_recurse_enable=YES/ls_recurse_enable=YES/' /etc/vsftpd/vsftpd.conf # sed -i 's/listen=NO/listen=YES/' /etc/vsftpd/vsftpd.conf # sed -i 's/listen_ipv6=YES/listen_ipv6=NO/' /etc/vsftpd/vsftpd.conf # echo ' allow_writeable_chroot=YES local_root=public_html use_localtime=YES' >> /etc/vsftpd/vsftpd.conf # systemctl start vsftpd # systemctl enable vsftpd # firewall-cmd --permanent --zone=public --add-service=ftp # firewall-cmd --reload
상위 디렉토리 접근을 허용 할 경우 ID 등록
# echo '
oerun' >> /etc/vsftpd/chroot_list
# systemctl restart vsftpd