chroot / vsftpd

Discussion in 'Server Operation' started by andre, May 3, 2005.

  1. andre

    andre New Member

    I'm using vsftpd as my FTP server, and I'd like to chroot my FTP users to their home dir. How can I do it?

    Andre
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Put

    Code:
    passwd_chroot_enable=YES
    in

    Code:
    /etc/vsftpd.conf
    and restart vsftpd. That chroots each user to the directory specified in /etc/passwd. If you want to chroot a user to another directory than his home directory, simply put a dot (.) in the path to his home directory in /etc/passwd:

    admin:x:1000:1000:admin:/home/./admin:/bin/bash

    would chroot the user admin to /home instead of /home/admin.
     

Share This Page