The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > SUN Solaris
.
google unix.com



SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to start a chroot jail? mojoman UNIX for Dummies Questions & Answers 1 04-18-2009 10:23 AM
CHRoot Problem Crazy_murli UNIX for Advanced & Expert Users 2 01-09-2007 03:59 AM
FTPD, CHROOT, SMF and non-root user CowsUdders UNIX for Dummies Questions & Answers 2 01-12-2006 12:06 PM
chroot environment samurai79 AIX 0 08-10-2005 09:09 PM
chroot? byblyk Linux 0 04-02-2004 11:50 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 3 Weeks Ago
vettec3 vettec3 is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 15
openssh and chroot.

Hi all. I have installed openssh 5.3 and set up jailed root.

It works almost as I want it to I cant cd to any directory above my ch root.

my config :
entry in passwd:
Code:
test2:x:103:113::/users2/test2:/bin/false
sshd_conf:
Code:
Match User test2
ChrootDirectory /users2/%u
#       X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp
directories:
/users2 owner root:root 755
/users2/test2 owner root:root 755
/users/test2/ftpfiles owner test2:mygroup 755

When I do sftp test2@testhost I enter in /users2/test2 but there I cant write so I have to cd into ftpfiles
Is this the expected behavior? ? I expected to enter directly to a directory where I could write preferably, /users2/test2.

Should I use other options to ChrootDirectory?

Thanks in advance.

/Jan

Last edited by pludi; 3 Weeks Ago at 05:22 PM.. Reason: code tags, please...
  #2 (permalink)  
Old 3 Weeks Ago
tamitot tamitot is offline
Registered User
  
 

Join Date: Nov 2009
Location: currrently in kuwait
Posts: 8
your /user2/test2 directory should be owned by the user test2. it is currently owned by root with permission 755.
  #3 (permalink)  
Old 3 Weeks Ago
incredible incredible is offline Forum Advisor  
Registered User
  
 

Join Date: May 2008
Location: s'pore
Posts: 2,088
change your shell for test2 from /bin/false to a valid shell
  #4 (permalink)  
Old 3 Weeks Ago
vettec3 vettec3 is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 15
Tested your suggestions.

Changing the shell did not resolve the problem Maybe I have to do otherthings to?

Changing owner of /users2/test2 to test2:mygroup 755
made things change but showed a strange behavior.

sftp from winxp using wincsp logs me in to /users2/test2 and I can write and not change to any other directory exactly as I wanted it to be.

BUT issuing sftp at command line from another solaris host
after entering the passwd I get a "connection to host closed by remote host"
I tried the ssh client that comes with solaris and /usr/local/bin/ssh but both fails.
What is the difference between winscp and the cmd line sftp in solaris?
  #5 (permalink)  
Old 3 Weeks Ago
tamitot tamitot is offline
Registered User
  
 

Join Date: Nov 2009
Location: currrently in kuwait
Posts: 8
you can use the -v option to increase verbosity of sftp/ssh connection. max of 3 v's for maximum verbosity. should show you what's the problem.

Code:
$ sftp -vvv user@host
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:57 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0