Fails to authenticate users after container recreation
MichalMoravik opened this issue · comments
Hi! I created some FTP users but after I stopped and removed the Docker container, I could not authenticate using these users. I am keeping all my data inside of volumes, so it should be possible to authenticate even after recreation. I found out, after looking inside of the Docker's container (/home/ftpusers), that the folders with users' names are still there. Therefore I think it could be that passwords are damaged or that I do something wrong.
Steps I took:
- Running docker-compose up
docker exec -it <container-id> bash
- Adding a new user:
pure-pw useradd bob -f /etc/pure-ftpd/passwd/pureftpd.passwd -m -u ftpuser -d /home/ftpusers/bob
- I am able to log in as Bob
- I stop and remove the container
- I recreate the container and expect that users will be recreated as well (thanks to volumes)
- I cannot log in as Bob (only as Admin who is newly created every time or when I add a new user again but with name other than Bob)
- The FileZilla error I am getting:
- I look into the container once again:
docker exec -it <container-id> bash
- After going to /home/ftpusers I can see Bob's directory is still there so it should be possible to log in using Bob as well
Does somebody know what could be wrong, please? It is kind of urgent for my company. Thanks a lot!
Okay I found out that I did a mistake in my docker-compose.yml file. In volumes, there should be ./ftp_data/ftp/passwd:/etc/pure-ftpd/passwd
instead of ./ftp_data/ftp/passwd:/home/pure-ftpd/passwd
. It must be "etc" folder, not "home" folder. Sorry for that, I am closing the issue.