-1

I'm using both Redhat and CentOS. When i do followings:

 # vi /etc/vsftpd/vsftpd.conf
 chroot_local_user=YES
 # service vsftpd restart

Then All Users are jailed in their homes.
What i really wanna know is:

  • HOW TO JAIL A SPECIFIC USER ONLY?
夏期劇場
  • 15,969
  • 40
  • 121
  • 208

1 Answers1

1

In /etc/vsftpd/vsftpd.conf file comment the chroot_local_user=YES or set to NO and enable the following arguments

chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list

Put the particular user in the /etc/vsftpd.chroot_list, restart vsftpd with service vsftpd restart then that particular user would be jailed to his home directory.

Thanks & Regards,
Alok

linux_fanatic
  • 4,358
  • 3
  • 16
  • 20
  • Hmmmmmm.. YES it works perfectly UNDER FTP mode. But when i use `SFTP` as protocol, that feature is NOT working anymore. Can go through whole machine again. Need some more thing? – 夏期劇場 Sep 13 '13 at 07:11
  • Hi yes sftp works with ssh configuration and for that you either have to disable sftp for the users and allow only vsftpd or else http://www.thegeekstuff.com/2012/03/chroot-sftp-setup/ you can use this link for sftp jail rooting as question was for vsftpd i answered in terms of vsftpd :) – linux_fanatic Sep 13 '13 at 07:16
  • `disable sftp for the users and allow only vsftpd` ..? I did not get that. What i want is, i let users use, e.g, `FileZilla`, then i let them select `Protocol: SFTP`. Then they still can browse through. Is that what you meant for? – 夏期劇場 Sep 13 '13 at 07:21
  • Please jump to: http://stackoverflow.com/questions/18780716/linux-vsftpd-jail-a-specific-sftp-user-to-its-home – 夏期劇場 Sep 13 '13 at 07:33