0

Currently I have a vsftpd server on a CentOS machine with virtual users. The users are authenticated using MySQL.

The users have all the permissions in their home directory and they are jailed into their home directories. The current home directory is /home/vsftpd/<username> where <username> is the unique username for each user. It is working fine.

Now I want to create some new virtual or real users which will have another kind of home directory, e.g. /var/www/html/<username>.

I want to keep both types of users on the same server. I mean I need both the old users with the old home directory style and new ones with the different home directory style on the same vsftpd server.

Is this possible, and if so, how? I have gone through many tutorials but have found nothing.

2

1 Answer 1

0

afaik vsftpd is a single directory serving daemon. If you want to give users a different home directory and mysql as user storage doesn't offer you that option, you can only fall back to creating something with PAM and the linux user structure.

Basically you create users, authenticate them whatever userbase you want (using pam) and use another database to determine which home directory they own (using pam again).

A probably more easy approach would be to simply use the unix user system with a given group ID and setting their home directory manually. You could write a small wrapper script for useradd to accomplish this.

You must log in to answer this question.

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