LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   chroot not working for vsftp anymore (https://www.linuxquestions.org/questions/linux-newbie-8/chroot-not-working-for-vsftp-anymore-114195/)

noisybastard 11-09-2003 05:18 PM

chroot not working for vsftp anymore
 
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?

idaho 11-10-2003 08:14 AM

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.

noisybastard 11-10-2003 03:03 PM

Quote:

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.

idaho 11-10-2003 03:16 PM

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.

noisybastard 11-26-2003 02:40 PM

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.

idaho 11-26-2003 10:31 PM

Typing "exit" should do the same thing as <CTRL><D>.

I suspect that chroot is not going to be in the path of your non-root accounts.


All times are GMT -5. The time now is 11:07 AM.