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.
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.