I would like to chroot a user to their home directory on a debian linux server. Im using vsftpd server.

I've done it with a user before, and now cant remember how to do it. I've limited ssh access to the root user so the chrooted user cant ssh.

Anyone think of what i may be missing?


  • here is the two users from /etc/passwd chrooted: joomla:x:1001:100::/www/site1/docs:/bin/sh not chrooted wordpress:x:1003:100::/www/site2/docs:/bin/sh – madphp Aug 5 '09 at 16:52
  • As an added level of security you should never allow root ssh directly, always ssh in as a regular user and su to root – Robert Swisher Aug 6 '09 at 18:17
  • Im aware of the risk im taking, and im sure there a lot of things I can do to beef up my security, short of plugging it off the LAN. Would really appreciate an answer to my question though. – madphp Aug 9 '09 at 2:09



to vsftpd.conf.

| improve this answer | |
  • I have that setting set. I have one ftp user already up there that is chrooted fine. Tried adding another system user and its not chrooted. – madphp Aug 5 '09 at 15:33
  • Attach the lines for the chrooted user and for the new user from /etc/passwd to your question. – Anonymous Aug 5 '09 at 16:39
  • Done. See above. – madphp Aug 5 '09 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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