I am setting up ProFTPd with MySQL authentication. It works so far, I can connect. However, I want to set the SQLDefaultHomedir
directive so that I don't have to include it in my database. I want to include as part of the directive the username used to log in to the server. Thus, for instance, if someone logged in as dstrout, their home directory should be set to /var/www/projects/users/dstrout
. How can I do that? Can I set the SQLDefaultHomedir
directive to something like /var/www/projects/users/{$u}
?
Asked
Active
Viewed 594 times
0

Castaglia
- 3,349
- 3
- 21
- 42

Ashley Strout
- 218
- 2
- 13
1 Answers
2
It appears that SQLDefaultHomedir
is a single directory for ALL users who have no home directory in the database (in other words, they all share one directory). If you don't want to have an actual field for it in the database, you could hardcode it into the query, something like CONCAT('/var/www/projects/users/', username) AS homedir

DerfK
- 19,493
- 2
- 38
- 54
-
That's what I figured, but the SQL query might prove to be useful. – Ashley Strout Jan 05 '13 at 03:31