LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 09-30-2014, 01:23 PM   #1
ratotopi
Member
 
Registered: Dec 2011
Posts: 114

Rep: Reputation: 6
SFTP chrooted


Hi

I have create chrooted sftp. The user john has chrooted directory /chroot/home/john and in /etc/passwd his home directory is only /sftp so that when he sftp to the server it takes him directly to /chroot/home/john/sftp directory where he can execute all the user command which he would not have been able to execute in /chroot/home/john. What I want to achieve is even when john execute any command with / in front I want the directory to be /chroot/home/john/sftp not /chroot/home/john. Example executing mkdir /test I want the directory to be created inside /chroot/home/john/sftp/ it should not try to create inside /chroot/home/john which is not possible because of chrooted home directory. Thank you for any new idea you have in solving this problem.

Last edited by ratotopi; 09-30-2014 at 01:31 PM.
 
Old 10-01-2014, 05:35 AM   #2
spanik
LQ Newbie
 
Registered: May 2012
Posts: 1

Rep: Reputation: Disabled
Maybe obvious but...

CHROOT John to /chroot/home/john/sftp and set John's home directory in /etc/passwd to / instead of /sftp
 
Old 10-01-2014, 12:46 PM   #3
ratotopi
Member
 
Registered: Dec 2011
Posts: 114

Original Poster
Rep: Reputation: 6
NO that won't work, when you chroot /chroot/home/john/sftp the directory has to be owned by root and the chmod cannot be more than 755. John will not be able to create any file when he login.

Last edited by ratotopi; 10-01-2014 at 01:00 PM.
 
  


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
[SOLVED] sftp chrooted permission issue hamzar.pm Linux - Newbie 1 09-01-2012 06:41 AM
LXer: Restricting Users To SFTP Plus Setting Up Chrooted SSH/SFTP (Debian Squeeze) LXer Syndicated Linux News 0 09-06-2011 08:10 AM
SFTP server chrooted humbletech99 Linux - Security 2 04-02-2007 02:24 PM
sftp chrooted on samba - suggestions yogaboy Linux - Security 2 12-28-2006 09:24 AM
Problem with Scponly and chrooted SFTP kicko Mandriva 2 07-14-2006 02:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:51 AM.

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
Open Source Consulting | Domain Registration