I'm working on configuring a vsftpd-server for ubuntu-16.04.2-server.

I have set up a working configuration with user restricted access and a restriction on the upper directory, but I still want to change one thing.
Instead of being brought to a user's home directory I want the home directory to be different when connecting with FTP, without changing the actual home directory of the user.

the directory I want to have set as my home directory is a sub-directory of the home directory of a user

Thanks in advance, if any other information would be needed, please ask

up vote 0 down vote accepted

Sadly can not add comments due to reputation, so my answer can be lacking, but did you try setting "local_root" option to "/home/$USER/ftphome"? So vsftpd.conf would have lines like this:

local_root=/home/$USER/fpthome
user_sub_token=$USER

That is assuming /home/$USER is user home directory.

  • Weird, last time I tried this it didn't work, for some reason it works now. thx for the help – Bjorn Aug 1 '17 at 11:26
  • Maybe when you tried it before you had some of the other "chroot_" options off, and changed it while trying to get it to work. vsftpd.beasts.org/vsftpd_conf.html is pretty good source to go and look for what you need before asking. – Ethuil UI Aug 1 '17 at 15:41

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.