We have a system that logs into an FTP server (vsftpd on Linux), uploads a file to the default directory it lands in (it doesn't CWD) and then exits. For reasons beyond the scope of this question, it would be a pain to modify the FTP client application to have it change directories.
The user account that performs the upload is not currently chrooted, but I would like to chroot the account to improve security. However, the top-level chroot directory can't be writable according to vsftpd. Dropping the file in a subdirectory would be fine, but the client application doesn't have an option to change directories after login.
Considering this, is it possible to have the account's initial directory set to something other than /
if it is chrooted?
I have tried using the local_root
option in vsftpd.conf
, but that just chroots the user to the given directory, still starting them in /
versus a subdirectory like /putfileshere/
.
Only the one account will ever need to log into this FTP server if that helps.
put file subdir
?local_root
in your vsftp.conf?