vsftpd


We have installed vsftpd on a few of our servers to allow users to securely connect to upload or retrieve files.
The users are all chroot’d - they cannot cd out of their home directory.
Our procedure for configuring the server, vsftpd and the users to allow this follows.

Simple as: yum install vsftpd
(or apt-get if you are using a different Linux flavour).

The following settings work for me:

anonymous_enable=NO
local_enable=YES
write_enable=YES
idle_session_timeout=600
chroot_local_user=YES
listen=YES
pam_service_name=vsftpd
userlist_enable=NO
tcp_wrappers=YES
chmod_enable=YES
allow_writeable_chroot=YES

Restart the vsftpd service to enable the changes.

We did initially experience a persistent problem where users were connecting but then getting a “550 Failed to change directory” error .
This would typically be caused by SELinux but that was disabled on our servers, i.e. this is the relevant line from /etc/selinux/config:SELINUX=disabled
After some head scratching we realised that even with SELinux disabled we still had to set SELinux to permissive mode by running setenforce 0 or setenforce Permissive

All done.

Comment on this article using form below. Requires email login only for authentication. HTML forbidden, Markdown only.