Projekt

Allgemein

Profil

Install

yum 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
...
chroot_local_user=YES

enable and start service

chkconfig vsftpd on
/etc/init.d/vsftpd start

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