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
adding support for per user chroot jails to Unraid's stock FTP powered by vsftpd #958
base: master
Are you sure you want to change the base?
Conversation
…ser specific chroot jails
I'd avoid needing to change the |
How else would I go about it? I assume |
Doh. I found a bug/issue. I will fix. |
I am adding support for Is there a way from the webGui/PHP to write changes to whatever file is being used to create the |
Hello. I was wondering if there is anything else I need to do for this pull request? I've been using it for weeks with no issue. I think it will make unRAID better. It addresses the risk and makes the experience better. |
As of right now, everything works as expected except the PASV min/max port values reset after reboot. Changes to Is there a way from the webGui/PHP to write changes to whatever file is being used to create the /etc/vsftpd.conf file on boot? |
I was wondering if anyone had looked at this? If there is no intention of incorporating my code -- there are no hard feelings or issues on my part. I'd just like to know so I can "close the case" on my end. And if it won't be incorporated, then I'd prefer to just nix the code I have on my Unraid box and use ProFTPD or something. I have to use FTP cause that is all my camera and printer support. |
What and Why
I made some changes to enable per user chroot jails for vsftpd. This is the same functionality offered by ProFTPD but since vsftpd comes with Unraid and can also do it I figured it made sense.
I couldn't figure out how to test the changes to the help text because I don't know how to update the helptext.dot file.
One More File
Along with the three files listed in this commit, the
/etc/vsftpd.conf
file needs to be edited. I couldn't find it in this repo so I am putting those details here. These three settings need to be added:How It Works
chroot_local_user
forces users to stay within their "home directory".user_config_dir
tellsvsftpd
where to look for per user settingsI don't have a way to spin up an Unraid VM or second box so I can't do a full thorough test but testing it on my main/only/production Unraid box worked fine.
Screenshot
Known FTP Enabled Bug
I opened a bug report about this: https://forums.unraid.net/bug-reports/stable-releases/ftp-server-in-692-still-auto-starts-on-reboot-r1588/.
I think it happens because
/etc/inetd.conf
is replaced on reboot and in the stock one the ftp line is not commented out.To fix it, my thought was to save some FTP enable/disable status in
/boot/config/vsftpd.cfg
and then something in/boot/config/go
that would read it but I am not convinced that is the right approach within the Unraid ecosystem.