Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
up vote 2 down vote accepted

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

share|improve this answer
That's what I figured, but the SQL query might prove to be useful. – D. Strout Jan 5 '13 at 3:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.