Skip to content

Basic example walk through

Andrew Stilliard edited this page Nov 15, 2018 · 1 revision

Taken from our test which is run during all changes to the container.

Pull down the latest version

docker pull stilliard/pure-ftpd:hardened

Start it up

docker run -d --name ftpd_server -p 21:21 -p 30000-30009:30000-30009 -e "PUBLICHOST=localhost" -e "ADDED_FLAGS=-d -d" stilliard/pure-ftpd:hardened

Enter the container with a bash prompt

docker exec -it ftpd_server sh -c "export TERM=xterm && bash"

While inside the container you can now add a your ftp user

In this example we'll add "bob" with a home directory of "/home/ftpusers/bob"

pure-pw useradd bob -f /etc/pure-ftpd/passwd/pureftpd.passwd -m -u ftpuser -d /home/ftpusers/bob
# this will also ask you to enter the password for your user

Finally you can leave the bash prompt

exit

Now you should be ready to test FTP access

You can connect with any FTP client, such as Filezilla

Or connect locally with the ftp command:

ftp -p localhost 21
# enter the name of our user, e.g. bob & then their password
# now you're in!
# you can run commands list ls, get, put and delete to manage files this way and exit any time

If you have any issues, please check our Issues tab for help, check out our detailed README file or if this doesn't help please submit a new issue.