Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

VSFTP is set up and I want users not to go into other directories then their /home. I've set:

chroot_local_user=YES

But it doesn't seem to work (after restarting).

Could it be that I have the wrong config file? Or is there other settings or ways of logging in that skip this config line?


Edit: Together with someone else I found that the vsftp was not at all the server listening to the port.. Therefor, I didn't see my changes reflected. Solved the problem somewhere else thus.

Still, the answers below might solve the problem for others who have this.

share|improve this question
    
Jailing the User to it's home dir does not work, when using SFTP. Seems to be a bug. –  user98470 Oct 20 '11 at 12:50
    
Vsftpd is garbage. I've wasted hours trying to configure it. Just use proftpd instead. It even has an optional gui component that simplifies these kinds of setup issues. –  Cerin Aug 5 '13 at 21:33
add comment

3 Answers

Do you have the chroot_list_enable option enabled? If so, any users listed in chroot_list_file will not be chrooted.

share|improve this answer
add comment

I think part of this is redundant, but I've not gone back to poke at it, since it works. (I think I was where you were when first setting this up, which is why chroot_local_user is set...)

# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
chroot_local_user=YES
userlist_enable=YES

...and /etc/vsftpd.chroot_list is an empty file.

share|improve this answer
add comment

Make sure user's home directory is set and correct (not /root):

usermod -d /home/user user
share|improve this answer
add comment

Your Answer

 
discard

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.