1. Cài đặt vsftpd
yum -y install vsftpd
2. Cấu hình
Mở file /etc/vsftpd/vsftpd.conf
- Tìm
anonymous_enable=YES
sửa thành
anonymous_enable=NO
- Tìm
#ascii_upload_enable=YESsửa thành
#ascii_download_enable=YES
ascii_upload_enable=YES
ascii_download_enable=YES
- Tìm
#ls_recurse_enable=YESsửa thành
ls_recurse_enable=YES
- Tìm
#chroot_local_user=YESsửa thành
#chroot_list_enable=YES
#chroot_list_file=/etc/vsftpd/chroot_list
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list
- Thêm 2 dòng sau xuống cuối cùng
local_root=public_html- Tạo file chroot_list trong thư mục /etc/vsftpd
use_localtime=YES
- Thêm port 21 vào iptables
Mở file:/etc/sysconfig/iptables thêm vào
-A INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT
Khởi động lại iptables
service iptables restart
- Khởi động vsftpd
service vsfptd start
- Cấu hình vsftpd tự khởi động
chkconfig vsftpd on
Done
VIDEO
Đăng nhận xét Blogger Facebook
Click to see the code!
To insert emoticon you must added at least one space before the code.