stilliard / docker-pure-ftpd

Docker Pure-ftpd Server

Home Page:https://hub.docker.com/r/stilliard/pure-ftpd/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fails to authenticate users after container recreation

MichalMoravik opened this issue · comments

commented

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.

My docker-compose file:
Screenshot 2021-02-22 at 13 04 36

Steps I took:

  1. Running docker-compose up
  2. docker exec -it <container-id> bash
  3. Adding a new user: pure-pw useradd bob -f /etc/pure-ftpd/passwd/pureftpd.passwd -m -u ftpuser -d /home/ftpusers/bob
  4. I am able to log in as Bob
  5. I stop and remove the container
  6. I recreate the container and expect that users will be recreated as well (thanks to volumes)
  7. 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)
  8. The FileZilla error I am getting:

Screenshot 2021-02-22 at 13 09 59

  1. I look into the container once again: docker exec -it <container-id> bash
  2. 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!

commented

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.