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.

I've set up VSFTP on my Centos5.5 server. I've created a user on the box for ftp access. In the VSFTP config I've set:

chroot_list_enable=YES 
chroot_list_file=/etc/vsftpd.chroot_list

The conf file contains the username I created, so that the user is 'jail'ed to their home directory. When I connect to the FTP server using the command line FTP program this rule is followed, ie I can't browse above the home directory. However, when I connect using either Filezilla or gFTP I can browse above the home directory. Also, when I try to connect with either of those GUIs using standard FTP I can't get a directory listing although I can get it when connecting using SFTP. Could this be connected to the problem of the chroot being ignored? And in either case, can anyone suggest how I would go about getting the chroot rule to be followed by these GUIs?

I also followed the instructions on this page (http://www.cyberciti.biz/faq/iptables-open-ftp-port-21/) to open port 21 in the firewall, but it has made no difference.

share|improve this question

1 Answer 1

Try commenting out the previous 2 chroot_* lines and only leave this one enabled:

chroot_local_user=YES

and see if it fixes your problem. Make sure that you also have local_enable=YES

share|improve this answer
    
@O G: Thanks for the suggestion. I followed it and then restarted vsftpd, having made sure local_enable=YES was set, but it has made no difference –  hellsgate Aug 19 '11 at 12:40
    
Do you have selinux enabled? (sestatus) –  O G Aug 19 '11 at 13:23
    
@O G: selinux is disabled: SELinux status: disabled –  hellsgate Aug 19 '11 at 14:15
    
I just tested the scenario with chroot_local_user on my machine and I cannot replicate the behavior you describe with any client (tried: firefox,chrome,ncftp,gftp). vsftpd version here is 2.3.2 - what version are you using? –  O G Aug 19 '11 at 15:29
    
@O G: Sorry I havn'e replied, I've been off for the weekend. Anyway, I'm running version 2.0.5. I'll upgrade to 2.3.2 and see what happens –  hellsgate Aug 22 '11 at 8:48

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.