ftp:500 OOPS: chroot

yum update

yum install vsftpd

systemctl start vsftpd

systemctl enable vsftpd

firewall-cmd --zone=public --permanent --add-port=21/tcp

firewall-cmd --zone=public --permanent --add-service=ftp

firewall-cmd –-reload

cp /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.conf.default

vim /etc/vsftpd/vsftpd.conf

anonymous_enable=NO
local_enable=YES
write_enable=YES
chroot_local_user=YES
allow_writeable_chroot=YES
userlist_enable=YES
userlist_file=/etc/vsftpd/user_list
userlist_deny=NO

systemctl restart vsftpd

adduser testuser

passwd testuser

echo “testuser” | tee –a /etc/vsftpd/user_list

mkdir –p /home/testuser/ftp/upload
chmod 550 /home/testuser/ftp
chmod 750 /home/testuser/ftp/upload
chown –R testuser: /home/testuser/ftp

last,500 OOPS: chroot ,wtf!!!!

setenforce 0

BINGO!!!!

?????????

getsebool -a |grep ftp
ftpd_full_access-->off
tftp_home_dir-->off
????
setsebool ftpd_full_access on
setsebool tftp_home_dir on

ftp...:21

success!

over!

上一篇:ubuntu的vsftpd


下一篇:JAVA抓取URL