LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices

Reply
 
Search this Thread
Old 11-09-2003, 06:18 PM   #1
noisybastard
Member
 
Registered: May 2003
Distribution: RedHat 9
Posts: 32

Rep: Reputation: 15
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?
 
Old 11-10-2003, 09:14 AM   #2
idaho
Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: RedHat, Libranet
Posts: 438

Rep: Reputation: 30
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.
 
Old 11-10-2003, 04:03 PM   #3
noisybastard
Member
 
Registered: May 2003
Distribution: RedHat 9
Posts: 32

Original Poster
Rep: Reputation: 15
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.
 
Old 11-10-2003, 04:16 PM   #4
idaho
Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: RedHat, Libranet
Posts: 438

Rep: Reputation: 30
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.
 
Old 11-26-2003, 03:40 PM   #5
noisybastard
Member
 
Registered: May 2003
Distribution: RedHat 9
Posts: 32

Original Poster
Rep: Reputation: 15
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.
 
Old 11-26-2003, 11:31 PM   #6
idaho
Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: RedHat, Libranet
Posts: 438

Rep: Reputation: 30
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Working on Apache Chroot zhizaki Linux - Security 9 11-29-2005 06:53 AM
vsftp and chroot question blubbfish Linux - Security 2 10-04-2004 11:03 AM
vsFTP (and chroot) DATA_OK Linux - Security 10 10-30-2003 11:10 AM
chroot not working. dkc_ace Linux - General 9 08-13-2003 01:56 PM
vsFTP not working over modem lansman Linux - Networking 1 06-17-2003 09:32 PM


All times are GMT -5. The time now is 12:38 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration