Aktionen
Install¶
dnf install vsftpd
create user¶
adduser userftp
passwd userftp
disable the ssh login and enable just for ftp
usermod -s /sbin/nologin userftp
setup config¶
edit /etc/vsftpd/vsftpd.conf
... anonymous_enable=NO ... local_enable=YES
enable and start service¶
systemctl start vsftpd.service
systemctl stop vsftpd.service
systemctl enable vsftpd.service
setup firewall¶
open port 21
iptables --list
iptables -I INPUT 1 -p tcp --dport 21 -j ACCEPT
/etc/init.d/iptables save
troubleshoot¶
if you can connect but get a 500 OOPS: cannot change directory
most likely this is due to the fact that Selinux doesn't allow access to the users home-directory. You can fix this by:
setsebool -P ftp_home_dir 1
Von Jeremias Keihsler vor mehr als 4 Jahren aktualisiert · 3 Revisionen