I've seen many solutions like homedir=/somepath/$USER where $USER takes from sysvar and I want to change it for every user with mysql database. I'm using it with pam-mysql so it will look like

Id login passwd homedirectory

And I want this home directory to put in vsftpd.conf->home_directory = something like

 select homedirectory from vsftpd where login='$USER'

Is it possible?

1 Answer 1


Crap, it's so silly and this works...

local_root=``mysql -sN -utestuser -ptestpass -h localhost DB_NAME -e "select homedir from vsftpd.users where userid = '$user'"``
  • Where did you have found the related documentation? Jun 25, 2020 at 7:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .