Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I used to have chroot working just fine for vsftp, but now it's not working at all. I can login and it takes me to the right home folder that I want the user to be locked in, but instead of showing just a "/" for their folder it's the whole server path and they're able to back out of the folder.
I've already set up the following:
1. changed the user home directory in passwd to the folder I want them locked to
2. changed the vsftpd.conf to turn chrooting ON
3. added the user to the chroot list
I even rebooted the server just to be sure, but every time it's the same problem. Any ideas?
Originally posted by idaho I don't know the vsftp package, but my first step would be to verify that I could chroot to the preferred directory from a command line.
I'm not quite sure what you mean by that. I only know chroot as a setting in vsftp. I'm not aware of how it would be done via the command line, unless you mean to try logging in to the ftp from the command line, which I tried and it still didn't work.
To test your chroot jail at the command line, you should be able to cd to the chroot root directory, and invoke: "chroot ." If this was successful, you can leave the chroot environment by invoking "<CTL><D>".
Generally, if this does not work, then your ftp server won't be able to establish the chroot environment either.
I tried running chroot, but since I'm logged in via ssh I didn't know if CRTL-D would work. When I try to run chroot as root it seems to find the command, but under any other account it can't find it. Is it supposed to do that?
I've looked over the vsftpd.conf file again and it's perfect, so it can't be that. I'm not sure what it could be now.