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 want to set up two FTP users for my server (Ubuntu 8.04):

  1. One that logs into /var/www so they can access and administer all the web site files
  2. One that is chroot'd to (say) /var/www/images so that they can only access the site's images

Ideally I'd like to be able to configure each user's FTP directory separately, something like:

#userid     chroot location
webadmin   /var/www
imageadmin /var/www/images

Is there a way of doing this with VSFTP? All the examples I can find with virtual users show chrooting with a /some/dir/$username format.

I presume I could create a local imageadmin account with a home directory of /var/www/images and use local logins instead? Is that sensible for an FTP-only user (I guess I could set the shell to null...)?

share|improve this question
up vote 1 down vote accepted
sudo useradd -d /var/www webadmin
sudo passwd webadmin
sudo useradd -d /var/www/images imageadmin
sudo passwd imageadmin

Vsftpd will automatically chroot users to their home dirs, so if you create the users with home dirs pointing to the ones you want them to be jailed in, you're all set.

Setting the shell to null is a good idea. It is also possible to deny logins to ssh for certain users.

share|improve this answer
Thanks, this is what I've ended up doing. – Paolo Feb 12 '10 at 13:06

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.