-
Notifications
You must be signed in to change notification settings - Fork 342
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
Manually add a new FTP user to an existing container #53
Comments
This is my exact issue - would you happen to have found a resolution for this as i've spent hours on it and still not getting anywhere |
+1 for any clues please. |
If anyone is still looking for a solution to this, I have a possibility but it involves changing quite a few of scripts and 'breaking' some of the original solution. You can move the location of virtual_users.db to a different directory and mount it on the host using VOLUME so that the user db persists across container restarts. I also eliminated the creation of default FTP_USER and start with an empty user db, creating users manually as-needed. I make no comment on the security of doing this. You could try adding crypt=crypt to the vsftpd_virtual?https://nasauber.de/blog/2020/howto-virtual-users-for-vsftpd/ A number of modifications are required to the source configuration and script files to enable this, but at a high-level the steps are:
With a running container you then do: Then you can start the container, create users as you need, and assuming you also mounted the /home/vsftpd volume too, if you stop/start the container, the user config persists. Also I didn't find the need to restart the container when a new user is added, authentication seems to work fine as soon as the user is added. There is still an issue of duplicating config in vsftpd.conf each time you restart the same container, due to run-vsftpd.sh appending config using >> when it runs. I didn't fix this yet. |
Hello, can you share with me a sample of your addftpuser.sh file? Thanks |
I've posted the complete solution here https://github.com/phantom-artist/vsftpd if you want details of the scripts etc. |
Hello,
The documentation provides an example to manually add a new FTP user to an existing container
Nevertheless each time the container is restarted,
virtual_users.txt
is erased inrun-vsftpd.sh
so the new added user is deleted.May be I'm doing someting wrong.
The text was updated successfully, but these errors were encountered: