1

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

Bjorn
  • 53

1 Answers1

0

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.

Esuil
  • 371
  • Weird, last time I tried this it didn't work, for some reason it works now. thx for the help – Bjorn Aug 01 '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. http://vsftpd.beasts.org/vsftpd_conf.html is pretty good source to go and look for what you need before asking. – Esuil Aug 01 '17 at 15:41