0

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}?

Castaglia
  • 3,349
  • 3
  • 21
  • 42
Ashley Strout
  • 218
  • 2
  • 13

1 Answers1

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