vsftpd server configured for password file virtual users
138
Run an FTP service with virtual users out of an injected passwd file and optional per-user sftpd.conf overrides.
Password file can be created and modified like so:
htpasswd -c -p -b vsftpd.passwd [user] $(openssl passwd -1 -noverify [password])
Then just mount the resulting vsftpd.passwd as a volume to /etc/vsftpd.passwd and authentication should work.
All users will be flattened to the "vsftpd" user in the container, which has uuid 1000. You will need to set a local_root that points at a mounted data volume of some kind. Simply mount a customized vsftpd.conf (extract the one from the image with docker run ... cat /etc/vsftpd.conf) at /vsftpd.conf (not /etc/vsftpd.conf due to permissions issues). All users will be chrooted to this spot by default.
If you want to customize config per user create vsftpd.conf snippet files named after them in a directory and mount it as /vsftpd_user_conf (not /etc/vsftpd_user_conf). See docs for details:
https://security.appspot.com/vsftpd/vsftpd_conf.html
I used these too:
http://askubuntu.com/questions/575523/how-to-setup-virtual-users-for-vsftpd-with-access-to-a-specific-sub-directory http://serverfault.com/questions/450214/vsftpd-will-not-accept-passwords-encrypted-with-md5 https://registry.hub.docker.com/u/odiobill/vsftpd/dockerfile/
Content type
Image
Digest
sha256:0c660dea0…
Size
60.1 MB
Last updated
about 11 years ago
docker pull spieden/vsftpd-virtual-users:0.4