docker-pure-ftpd: User not being created
This is my docker compose file.
ftp:
image: stilliard/pure-ftpd:hardened
volumes:
- "./tests/ftp:/hostmount"
ports:
- "21:21"
command: /bin/bash /hostmount/init.sh
Here is my init.sh script for adding the user and starting the ftp server
( echo "test" ; echo "test" ) | pure-pw useradd test -m -u ftpuser -d /home/ftpusers/test
pure-pw show test
sh -c /usr/sbin/pure-ftpd -c 5 -C 5 -l puredb:/etc/pure-ftpd/pureftpd.pdb -E -j -R -P localhost -p 21:21 -p 30000:30009
Here is the output in the container:
Password:
Enter it again:
2017-08-30T14:33:08.744521558Z
Login : test
Password : $1$7X.BTw60$fXr9SwwP17gIXTyG/xDD6/
UID : 1000 (ftpuser)
GID : 1000 (ftpgroup)
Directory : /home/ftpusers/test/./
Full name :
Download bandwidth : 0 Kb (unlimited)
Upload bandwidth : 0 Kb (unlimited)
Max files : 0 (unlimited)
Max size : 0 Mb (unlimited)
Ratio : 0:0 (unlimited:unlimited)
Allowed local IPs :
Denied local IPs :
Allowed client IPs :
Denied client IPs :
Time restrictions : 0000-0000 (unlimited)
Max sim sessions : 0 (unlimited)
2017-08-30T14:33:08.744762482Z
But when i try to login it gives me an authentication error. And the /home/ftpusers directory is empty.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 18 (8 by maintainers)
output
Hi @djorg83 , when creating the user I believe you need to pass the database file, e.g.