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

Trying to figure out the best way to set the default directory for the few FTP users we have (3 in-house developers who need access simply to the WWW directory). Want to just set it so that if any of those three login via FTP they're automatically put into the WWW directory so they can create directories for projects, see existing projects, etc.

Any idea how this is best done? I've installed vsftpd - but don't know how to set a 'default' directory that FTP users log into.

Thanks in advance.

share|improve this question
Do those users do anything else on that system? You should simply adjust the home directory for those users to be the directory you want. – Zoredache Apr 16 '13 at 18:39
How would I go about that? – Hanny Apr 16 '13 at 19:00
Nevermind - I went into /etc/passwd and edited the home directory there and it worked exactly as intended. Thanks! – Hanny Apr 16 '13 at 19:05

Went into /etc/passwd and updated the home directory for those users to point to /var/www!

share|improve this answer
Not how I would do this, but I guess it works. Mind the big security hole you just opened. – Jacob Apr 16 '13 at 20:03
It's an internal server only accessed internally (behind firewalls), with only 2 users who have ftp access to the server. What is the security hole just opened and what would be the best way to fix it? Seems silly to criticize just to criticize and not offer any suggestions how to make it better. I came here and asked the question because I didn't know how to do it - so instead of saying "not how I would do this", explain how you would do it. – Hanny Apr 16 '13 at 21:13

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.