Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot list directory when new user added. #188

Open
sniperwolf88 opened this issue Mar 18, 2023 · 1 comment
Open

Cannot list directory when new user added. #188

sniperwolf88 opened this issue Mar 18, 2023 · 1 comment

Comments

@sniperwolf88
Copy link

I followed the steps to run ftp in docker using docker compose, but when I create an extra user with the command:

pure-pw useradd USER -f /etc/pure-ftpd/passwd/pureftpd.passwd -m -u ftpuser -d /home/ftpusers/USER

It creates the user and writes the information in the pureftpd.passwd file, but it doesn't create the directory for the user. I tried multiple ways, including matching the id and gid with the volume where I have mapped persistent files, but I was unsuccessful. The ftp client always returned that the directory was inaccessible. Apparently and as I could confirm, the directory is not created after executing the command inside the container.

The only way I could solve it was by running:

docker exec -it pure-ftpd-1 pure-pw useradd USER -f /etc/pure-ftpd/passwd/pureftpd.passwd -m -u 1500 -g 1500 -d /home/ftpusers/USER

And then on the docker host, where I have mapped the data volume, with the user with id 1500 and gid 1500:

mkdir /home/apps/production/docker/pure-ftpd/pure-ftpd-1/data/USER

This way, I was able to make everything work.

@stilliard
Copy link
Owner

Hi @sniperwolf88
Would it work if you created their home folder first?
Looking over our run.sh file that looks to be how we do it too:
https://github.com/stilliard/docker-pure-ftpd/blob/master/run.sh#L61

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants