LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 10-22-2003, 04:56 PM   #1
schwing
LQ Newbie
 
Registered: Oct 2003
Location: Michigan, USA
Distribution: YellowDogLinux & Debian Sarge
Posts: 14

Rep: Reputation: 0
Question sftp + chroot ... almost


I've almost got a chroot'd jail for openssh's sftp, but there's one thing it's not doing for me. It won't change the root to the user's home directory. It does do the 'change directory' but doesn't stay locked in it.

Some details. Openssh-3.7.1p2 and the openssh-chroot-patch from chrootssh.sourceforge.net. Testing on YDL-2.3. I want to allow user the ability to their website content throught sftp and not ftp. ProFTPd allows me to do it, but I want it with sftp.

I've got the chroot jail setup with all the libraries and binarys and I am able to connect and initially land in the home directory specified in /etc/passwd. However, when I do a "cd /" I should stay in my home directory, but instead I get taken down one level to where the chroot files actually are.

The entry in my /etc/passwd file looks like this:
bill:x:504:505::/usr/local/apache/htdocs/./bill/:/bin/bash

htdocs/ is where I have usr/, lib/, etc/, bin/, dev/.

Is there something I'm missing as to why the user bill isn't chrooted to /usr/local/apache/htdocs/bill ?
 
Old 10-26-2003, 09:31 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,671
Blog Entries: 54

Rep: Reputation: 2953Reputation: 2953Reputation: 2953Reputation: 2953Reputation: 2953Reputation: 2953Reputation: 2953Reputation: 2953Reputation: 2953Reputation: 2953Reputation: 2953
See if setting the shell to "/bin/sh" works, for some reason the doc says chrooting ssh wants that, as opposed to using "chroot" directly, which wants /bin/bash.
 
  


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
Restrict ssh/sftp with chroot? Chowroc Linux - Networking 4 01-25-2005 11:48 AM
chroot sftp user group bmeckle Linux - Newbie 0 06-02-2004 04:58 PM
Sftp and chroot axman Linux - Security 4 10-02-2003 05:51 PM
chroot jail sftp users f1uke Linux - Security 1 07-28-2003 11:29 AM
chroot sftp user? cliffyman Linux - Security 8 05-08-2003 10:58 PM


All times are GMT -5. The time now is 10:39 PM.

Main Menu
Advertisement
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