其他分享
首页 > 其他分享> > ftp:500 OOPS: chroot

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!

标签:ftp,chroot,testuser,etc,--,vsftpd,OOPS,home
来源: https://www.cnblogs.com/hicolin/p/15107558.html