<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: Linux Configure rssh Chroot Jail To Lock Users To Their Home Directories Only</title> <atom:link href="http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html/feed" rel="self" type="application/rss+xml" /><link>http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html</link> <description>This is a Linux sys admin journal by Vivek about sys admin work, Linux tips &#38; tricks, hacks, news and more.</description> <lastBuildDate>Fri, 10 Feb 2012 20:37:43 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: Rick</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-175442</link> <dc:creator>Rick</dc:creator> <pubDate>Fri, 04 Nov 2011 02:10:34 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-175442</guid> <description>Feel the exact same why *sigh* but client gets what client wants.</description> <content:encoded><![CDATA[<p>Feel the exact same why *sigh* but client gets what client wants.</p> ]]></content:encoded> </item> <item><title>By: Loshen</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-173870</link> <dc:creator>Loshen</dc:creator> <pubDate>Mon, 12 Sep 2011 08:40:27 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-173870</guid> <description>In version 5, jailing is now natively supported.
The problem is that SSH with centos 5.5 lower came with ssh 4.8 &lt; .
So if you upgrade you will  automatically get Jailing.
I followed these instructions. http://adamsworld.name/chrootjailv5.php</description> <content:encoded><![CDATA[<p>In version 5, jailing is now natively supported.<br
/> The problem is that SSH with centos 5.5 lower came with ssh 4.8 &lt; .<br
/> So if you upgrade you will  automatically get Jailing.<br
/> I followed these instructions. <a
href="http://adamsworld.name/chrootjailv5.php" rel="nofollow">http://adamsworld.name/chrootjailv5.php</a></p> ]]></content:encoded> </item> <item><title>By: Gustavo</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-173830</link> <dc:creator>Gustavo</dc:creator> <pubDate>Sat, 10 Sep 2011 03:36:42 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-173830</guid> <description>Very good tutorial, I wonder if there is no way to change the message out to access &quot;This account is restricted by rssh.
Allowed commands: scp
If you believe this is in error, please contact your system administrator.
&quot;
For another message.
Thank you for your help. Greetings from Colombia</description> <content:encoded><![CDATA[<p>Very good tutorial, I wonder if there is no way to change the message out to access &#8220;This account is restricted by rssh.<br
/> Allowed commands: scp</p><p>If you believe this is in error, please contact your system administrator.<br
/> &#8221;<br
/> For another message.</p><p>Thank you for your help. Greetings from Colombia</p> ]]></content:encoded> </item> <item><title>By: tgutierrez</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-173827</link> <dc:creator>tgutierrez</dc:creator> <pubDate>Fri, 09 Sep 2011 22:56:16 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-173827</guid> <description>Working!!
This work perfectly,at  first I&#039;d connection problems but these problems were fixed just adding /chroot/lib64/libnss_files.so.2.
I have RHEL 6
Thanks</description> <content:encoded><![CDATA[<p>Working!!<br
/> This work perfectly,at  first I&#8217;d connection problems but these problems were fixed just adding /chroot/lib64/libnss_files.so.2.<br
/> I have RHEL 6</p><p>Thanks</p> ]]></content:encoded> </item> <item><title>By: Solaria</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-172670</link> <dc:creator>Solaria</dc:creator> <pubDate>Fri, 22 Jul 2011 20:29:52 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-172670</guid> <description>Got this working on Solaris, works well.  Here are some of the errors encountered, and the solutions:
&lt;em&gt;Error:  unknown user xxx
&lt;/em&gt;
Occurs during SCP.  Missing &quot;nss* lib in chroot, copy /lib/nss_files.so.1 to chroot. (Solaris 10)
&lt;em&gt;Error:  connection closed
&lt;/em&gt;
Occurs during SFTP. Missing *ksh* in chroot, copy /bin/ksh and/or /usr/bin/ksh to chroot
&lt;em&gt;Error:  connection closed
&lt;/em&gt;
Occurs during SCP on Solaris 9.  Missing *nss* lib in chroot, different library path than in Solaris 10.  Copy /usr/lib/nss_files.so.1 to chroot.
&lt;em&gt;Error:  rssh_chroot_helper failed, Not owner
&lt;/em&gt;
/usr/local/libexec/rssh_chroot_helper must be SUID root
&lt;em&gt;Error: user attempted to execute forbidden commands; /usr/lib/ssh/sftp-server
&lt;/em&gt;
Occurs during SFTP, logged in /var/adm/messages.  Target system had both OpenSSH and SolarisSSH, error caused by conflict between rssh config and sshd_config.  run &#039;/usr/local/bin/rssh -v&#039; to get sftp server binary path, compare to &#039;Subsystem sftp&#039; path in sshd_config (both config files, OpenSSH and SolarisSSH).  Edit sshd_config to match rssh config.
Found a pretty good script file for setting up the chroot on Solaris...</description> <content:encoded><![CDATA[<p>Got this working on Solaris, works well.  Here are some of the errors encountered, and the solutions:</p><p><em>Error:  unknown user xxx<br
/> </em></p><p>Occurs during SCP.  Missing &#8220;nss* lib in chroot, copy /lib/nss_files.so.1 to chroot. (Solaris 10)</p><p><em>Error:  connection closed<br
/> </em></p><p>Occurs during SFTP. Missing *ksh* in chroot, copy /bin/ksh and/or /usr/bin/ksh to chroot</p><p><em>Error:  connection closed<br
/> </em></p><p>Occurs during SCP on Solaris 9.  Missing *nss* lib in chroot, different library path than in Solaris 10.  Copy /usr/lib/nss_files.so.1 to chroot.</p><p><em>Error:  rssh_chroot_helper failed, Not owner<br
/> </em></p><p>/usr/local/libexec/rssh_chroot_helper must be SUID root</p><p><em>Error: user attempted to execute forbidden commands; /usr/lib/ssh/sftp-server<br
/> </em></p><p>Occurs during SFTP, logged in /var/adm/messages.  Target system had both OpenSSH and SolarisSSH, error caused by conflict between rssh config and sshd_config.  run &#8216;/usr/local/bin/rssh -v&#8217; to get sftp server binary path, compare to &#8216;Subsystem sftp&#8217; path in sshd_config (both config files, OpenSSH and SolarisSSH).  Edit sshd_config to match rssh config.</p><p>Found a pretty good script file for setting up the chroot on Solaris&#8230;</p> ]]></content:encoded> </item> <item><title>By: Amit</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-172333</link> <dc:creator>Amit</dc:creator> <pubDate>Fri, 08 Jul 2011 05:22:48 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-172333</guid> <description>Try to upgrade openSSH version and enjoy the new inbuilt jailroot system. Much easier.
CyberCiti : please post an article for the same.</description> <content:encoded><![CDATA[<p>Try to upgrade openSSH version and enjoy the new inbuilt jailroot system. Much easier.</p><p>CyberCiti : please post an article for the same.</p> ]]></content:encoded> </item> <item><title>By: X</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-172332</link> <dc:creator>X</dc:creator> <pubDate>Fri, 08 Jul 2011 02:14:48 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-172332</guid> <description>Everyone stuck at:
&quot;... ssh_chroot_helper[4470]: changing working directory to / (inside jail)&quot;
but then getting a refused connection on your sftp client.  *Trust other posters* in that it is a library issue...  I thought it was bullshit myself and almost gave up hope (no aparent error on my /var/log/syslog).  My last resort was to copy all the files in the /lib folder to the /chroot/lib folder.  Use the -p and --preserve=link switches so you preserve permissions and links (otherwise linked libraries will be copied as a file...).
cp -v -p -d --preserve=link  /lib/*  /chroot/lib/
It *will* work...  Now it&#039;s a matter of deleting one by one (if you want) and figuring it out the minimum subset required.  In my case (Ubuntu 11.04 server):
ld-2.12.1.so
ld-linux-x86-64.so.2
libc-2.12.1.so
libc.so.6
libnsl-2.12.1.so
libnsl.so.1
libnss_compat-2.12.1.so
libnss_compat.so.2
I also followed all previous suggestions in the earlier comments on this site (e.g., adding user to /chroot/etc/passwd... etcetera).  Good hunting!</description> <content:encoded><![CDATA[<p>Everyone stuck at:</p><p>&#8220;&#8230; ssh_chroot_helper[4470]: changing working directory to / (inside jail)&#8221;</p><p>but then getting a refused connection on your sftp client.  *Trust other posters* in that it is a library issue&#8230;  I thought it was bullshit myself and almost gave up hope (no aparent error on my /var/log/syslog).  My last resort was to copy all the files in the /lib folder to the /chroot/lib folder.  Use the -p and &#8211;preserve=link switches so you preserve permissions and links (otherwise linked libraries will be copied as a file&#8230;).</p><p>cp -v -p -d &#8211;preserve=link  /lib/*  /chroot/lib/</p><p>It *will* work&#8230;  Now it&#8217;s a matter of deleting one by one (if you want) and figuring it out the minimum subset required.  In my case (Ubuntu 11.04 server):<br
/> ld-2.12.1.so<br
/> ld-linux-x86-64.so.2<br
/> libc-2.12.1.so<br
/> libc.so.6<br
/> libnsl-2.12.1.so<br
/> libnsl.so.1<br
/> libnss_compat-2.12.1.so<br
/> libnss_compat.so.2</p><p>I also followed all previous suggestions in the earlier comments on this site (e.g., adding user to /chroot/etc/passwd&#8230; etcetera).  Good hunting!</p> ]]></content:encoded> </item> <item><title>By: Amit</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-172285</link> <dc:creator>Amit</dc:creator> <pubDate>Tue, 05 Jul 2011 08:10:02 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-172285</guid> <description>I am getting this error.. please help
Status:	Connected to x.x.x.x
Error:	Connection closed by server with exitcode 1
Error:	Could not connect to server</description> <content:encoded><![CDATA[<p>I am getting this error.. please help</p><p>Status:	Connected to x.x.x.x<br
/> Error:	Connection closed by server with exitcode 1<br
/> Error:	Could not connect to server</p> ]]></content:encoded> </item> <item><title>By: Greg</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-171449</link> <dc:creator>Greg</dc:creator> <pubDate>Fri, 20 May 2011 22:24:24 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-171449</guid> <description>I also found MySecureShell to be a superior tool to rssh.
It solved the issue that Ivan and Stefan warned about.
Their comments are dated August 22, 2008 &amp; September 2, 2008.</description> <content:encoded><![CDATA[<p>I also found MySecureShell to be a superior tool to rssh.<br
/> It solved the issue that Ivan and Stefan warned about.<br
/> Their comments are dated August 22, 2008 &amp; September 2, 2008.</p> ]]></content:encoded> </item> <item><title>By: Greg</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-171426</link> <dc:creator>Greg</dc:creator> <pubDate>Thu, 19 May 2011 21:41:42 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-171426</guid> <description>When in doubt, verify that the /chroot/dev/null exists.  Worked for me.</description> <content:encoded><![CDATA[<p>When in doubt, verify that the /chroot/dev/null exists.  Worked for me.</p> ]]></content:encoded> </item> <item><title>By: ALEX</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-170566</link> <dc:creator>ALEX</dc:creator> <pubDate>Tue, 12 Apr 2011 12:09:08 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-170566</guid> <description>JP - /libexec is inside /usr. You can remove libexec from your /chroot dir. That probably won&#039;t fix your problem but it could be messing with something. Other than that, I noticed your permissions in /etc are only operational for root. Try giving read permissions on the files in /etc. If that doesn&#039;t work, change it back.</description> <content:encoded><![CDATA[<p>JP &#8211; /libexec is inside /usr. You can remove libexec from your /chroot dir. That probably won&#8217;t fix your problem but it could be messing with something. Other than that, I noticed your permissions in /etc are only operational for root. Try giving read permissions on the files in /etc. If that doesn&#8217;t work, change it back.</p> ]]></content:encoded> </item> <item><title>By: Zoltan</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-170527</link> <dc:creator>Zoltan</dc:creator> <pubDate>Fri, 08 Apr 2011 14:48:20 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-170527</guid> <description>ps.: also make sure that your chroot user exists in the chroot/etc/passw file.</description> <content:encoded><![CDATA[<p>ps.: also make sure that your chroot user exists in the chroot/etc/passw file.</p> ]]></content:encoded> </item> <item><title>By: Zoltan</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-170526</link> <dc:creator>Zoltan</dc:creator> <pubDate>Fri, 08 Apr 2011 14:47:39 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-170526</guid> <description>What you get as a root is not an error, it just tells that the root user&#039;s home directory is not in the chrooted folder. This is expected
It seems your rssh is working with root user, so now you just need to figure out why it&#039;s not working with your chroot user.
Probably one of the necessary lib files, passwd file, sftp-server, rssh_chroot_helper etc file is not readable or executable by that user.
Unfortunately I couldn&#039;t figure out how to get logging activated to see what is missing, so from this point on you just need to check all these files for proper access rights.</description> <content:encoded><![CDATA[<p>What you get as a root is not an error, it just tells that the root user&#8217;s home directory is not in the chrooted folder. This is expected<br
/> It seems your rssh is working with root user, so now you just need to figure out why it&#8217;s not working with your chroot user.</p><p>Probably one of the necessary lib files, passwd file, sftp-server, rssh_chroot_helper etc file is not readable or executable by that user.<br
/> Unfortunately I couldn&#8217;t figure out how to get logging activated to see what is missing, so from this point on you just need to check all these files for proper access rights.</p> ]]></content:encoded> </item> <item><title>By: jp</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-170525</link> <dc:creator>jp</dc:creator> <pubDate>Fri, 08 Apr 2011 14:01:16 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-170525</guid> <description>Hi Zoltan,
I have changed the user permissions on the original rssh_chroot_helper to root:testing and then performed a chmod to reassert the SetUID.
I still get the same error and an extrea one when I do this.
Apr  8 14:55:46 testing-ftp rssh_chroot_helper[5621]: chroot() failed, 2: Operation not permitted
I have run throught the example 3 times and I know I have added more libs than are nessary at this point.
I have already copied /libnss_files.so.2 into the rewlative location as shown in my ls –lR above.
I can’t run the command /usr/libexec/rssh_chroot_helper 2 “/usr/libexec/openssh/sftp-server” as the testing user as the user is not allowed a shell. While trying to run the command as root. I get the following error
Apr  8 13:38:57 testing-ftp rssh_chroot_helper[4470]: new session for root, UID=0
Apr  8 13:38:57 testing-ftp rssh_chroot_helper[4470]: user&#039;s home dir is /root
Apr  8 13:38:57 testing-ftp rssh_chroot_helper[4470]: couldn&#039;t find /root in chroot jail
Apr  8 13:38:57 testing-ftp rssh_chroot_helper[4470]: chrooted to /users
Apr  8 13:38:57 testing-ftp rssh_chroot_helper[4470]: changing working directory to / (inside jail)
Thanks for your help.</description> <content:encoded><![CDATA[<p>Hi Zoltan,<br
/> I have changed the user permissions on the original rssh_chroot_helper to root:testing and then performed a chmod to reassert the SetUID.<br
/> I still get the same error and an extrea one when I do this.<br
/> Apr  8 14:55:46 testing-ftp rssh_chroot_helper[5621]: chroot() failed, 2: Operation not permitted<br
/> I have run throught the example 3 times and I know I have added more libs than are nessary at this point.<br
/> I have already copied /libnss_files.so.2 into the rewlative location as shown in my ls –lR above.<br
/> I can’t run the command /usr/libexec/rssh_chroot_helper 2 “/usr/libexec/openssh/sftp-server” as the testing user as the user is not allowed a shell. While trying to run the command as root. I get the following error<br
/> Apr  8 13:38:57 testing-ftp rssh_chroot_helper[4470]: new session for root, UID=0<br
/> Apr  8 13:38:57 testing-ftp rssh_chroot_helper[4470]: user&#8217;s home dir is /root<br
/> Apr  8 13:38:57 testing-ftp rssh_chroot_helper[4470]: couldn&#8217;t find /root in chroot jail<br
/> Apr  8 13:38:57 testing-ftp rssh_chroot_helper[4470]: chrooted to /users<br
/> Apr  8 13:38:57 testing-ftp rssh_chroot_helper[4470]: changing working directory to / (inside jail)<br
/> Thanks for your help.</p> ]]></content:encoded> </item> <item><title>By: Zoltan</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-170524</link> <dc:creator>Zoltan</dc:creator> <pubDate>Fri, 08 Apr 2011 13:32:56 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-170524</guid> <description>Hi JP,
Actually I found another possibe reason.
The rssh_chroot_helper is exeuted from the original folder and not the chrooted one, so you need to make sure that your chroot user has execute access to it.</description> <content:encoded><![CDATA[<p>Hi JP,<br
/> Actually I found another possibe reason.<br
/> The rssh_chroot_helper is exeuted from the original folder and not the chrooted one, so you need to make sure that your chroot user has execute access to it.</p> ]]></content:encoded> </item> <item><title>By: Zoltan</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-170522</link> <dc:creator>Zoltan</dc:creator> <pubDate>Fri, 08 Apr 2011 11:23:49 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-170522</guid> <description>Hi JP,
In my case the solution for the same problem was to add /[chrootedlibrary]/lib64/libnss_files.so.2
But in your case it might be some other lib files missing.
I would try to run /usr/libexec/rssh_chroot_helper 2 “/usr/libexec/openssh/sftp-server”
from shell to see whether I get any error message. You  might want to try with different users.
Also if the user (At least the user number )is not in the /chrootlibrary/etc/passwd file, then you will get the same error as above, but when you run it from shell it will tell you that couldn&#039;t find the user id.
I hope it helps</description> <content:encoded><![CDATA[<p>Hi JP,<br
/> In my case the solution for the same problem was to add /[chrootedlibrary]/lib64/libnss_files.so.2</p><p>But in your case it might be some other lib files missing.</p><p>I would try to run /usr/libexec/rssh_chroot_helper 2 “/usr/libexec/openssh/sftp-server”<br
/> from shell to see whether I get any error message. You  might want to try with different users.</p><p>Also if the user (At least the user number )is not in the /chrootlibrary/etc/passwd file, then you will get the same error as above, but when you run it from shell it will tell you that couldn&#8217;t find the user id.</p><p>I hope it helps</p> ]]></content:encoded> </item> <item><title>By: jp</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-170519</link> <dc:creator>jp</dc:creator> <pubDate>Fri, 08 Apr 2011 09:13:06 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-170519</guid> <description>1&gt; To get the rssh system to appear in my log. I followed - Paul Mitchell comment and added the following line to the sshd.conf. &quot;Subsystem       sftp    /usr/libexec/openssh/sftp-server&quot;
After which the following shows up in my /var/log/messages
{code}
Apr  8 09:15:34 test-ftp rssh[11728]: setting log facility to LOG_USER
Apr  8 09:15:34 test-ftp rssh[11728]: allowing scp to all users
Apr  8 09:15:34 test-ftp rssh[11728]: allowing sftp to all users
Apr  8 09:15:34 test-ftp rssh[11728]: setting umask to 022
Apr  8 09:15:34 test-ftp rssh[11728]: chrooting all users to /users
Apr  8 09:15:34 test-ftp rssh[11728]: chroot cmd line: /usr/libexec/rssh_chroot_helper 2 &quot;/usr/libexec/openssh/sftp-server&quot;
Apr  8 09:15:34 test-ftp kernel: type=1104 audit(1302250534.943:2545183): user pid=11723 uid=0 auid=526 msg=&#039;PAM: setcred acct=&quot;testing&quot; : exe=&quot;/usr/sbin/sshd&quot; (hostname=XX.XX.XX.XX, addr=XX.XX.XX.XX, terminal=ssh res=success)&#039;
{code}
2&gt; followed - Danilo Mota advise and made my passwd paths in the file relative to the enviroment.
I am still getting the errors above.
3&gt; I copied the nesary files sugested in several comments down. content of my /users folder shown below.
{code}
drwx------ 2 root    root    4096 Apr  7 16:56 bin
drwxr-x--- 2 root    root    4096 Apr  8 09:36 dev
drwx------ 3 root    root    4096 Apr  7 16:43 etc
lrwxrwxrwx 1 root    root       5 Apr  7 16:40 lib -&gt; lib64
drwxr-xr-x 2 root    root    4096 Apr  7 17:02 lib64
drwxr-xr-x 3 root    root    4096 Apr  7 13:35 libexec
drwxr-xr-x 2 testing testing 4096 Apr  7 20:57 testing
drwxr-xr-x 5 root    root    4096 Apr  7 14:05 usr
./bin:
total 1576
-rwx------ 1 root root 801512 Apr  7 16:56 bash
-rwx------ 1 root root 801512 Apr  7 16:56 sh
./dev:
total 0
srwxr-x--- 1 root root    0 Apr  8 09:36 log
crwxr-x--- 1 root root 1, 3 Apr  7 13:35 null
./etc:
total 76
-rwx------ 1 root root    36 Apr  8 09:49 group
-rwx------ 1 root root   100 Apr  7 13:37 hosts
-rwx------ 1 root root 47495 Apr  7 15:40 ld.so.cache
-rwx------ 1 root root   280 Apr  7 15:39 ld.so.conf
drwx------ 2 root root  4096 Apr  7 16:43 ld.so.conf.d
-rwx------ 1 root root  1696 Apr  7 15:40 nsswitch.conf
-rwx------ 1 root root    74 Apr  8 09:56 passwd
-rwx------ 1 root root    74 Apr  7 13:37 resolv.conf
./etc/ld.so.conf.d:
total 4
-rwx------ 1 root root 17 Oct 23 03:23 mysql-x86_64.conf
./lib64:
total 6852
-rwxr-xr-x 1 root root  139416 Apr  7 14:04 ld-linux-x86-64.so.2
-rwxr-xr-x 1 root root   10000 Apr  7 16:18 libcom_err.so.2
-rwxr-xr-x 1 root root 1366272 Apr  7 20:55 libcrypto.so.6
-rwxr-xr-x 1 root root   48600 Apr  7 20:55 libcrypt.so.1
-rwxr-xr-x 1 root root 1718120 Apr  7 20:55 libc.so.6
-rwxr-xr-x 1 root root   23360 Apr  7 20:55 libdl.so.2
-rwxr-xr-x 1 root root  190976 Apr  7 16:57 libgssapi_krb5.so.2
-rwxr-xr-x 1 root root  153720 Apr  7 17:01 libk5crypto.so.3
-rwxr-xr-x 1 root root    9728 Apr  7 16:18 libkeyutils.so.1
-rwxr-xr-x 1 root root  613896 Apr  7 16:58 libkrb5.so.3
-rwxr-xr-x 1 root root   35728 Apr  7 17:01 libkrb5support.so.0
-rwxr-xr-x 1 root root  114352 Apr  7 20:55 libnsl.so.1
-rwxr-xr-x 1 root root  233112 Apr  7 16:59 libnspr4.so
-rwxr-xr-x 1 root root 1231352 Apr  7 17:01 libnss3.so
-rwxr-xr-x 1 root root   53880 Apr  7 16:24 libnss_files-2.5.so
-rwxr-xr-x 1 root root   53880 Apr  7 16:53 libnss_files.so
-rwxr-xr-x 1 root root   53880 Apr  8 09:59 libnss_files.so.2
-rwxr-xr-x 1 root root  123152 Apr  7 17:02 libnssutil3.so
-rwxr-xr-x 1 root root   17992 Apr  7 16:54 libplc4.so
-rwxr-xr-x 1 root root   13960 Apr  7 17:00 libplds4.so
-rwxr-xr-x 1 root root  145824 Apr  7 16:18 libpthread.so.0
-rwxr-xr-x 1 root root   92736 Apr  7 20:55 libresolv.so.2
-rwxr-xr-x 1 root root   95464 Apr  7 16:18 libselinux.so.1
-rwxr-xr-x 1 root root  247496 Apr  7 16:18 libsepol.so.1
-rwxr-xr-x 1 root root   18152 Apr  7 20:55 libutil.so.1
-rwxr-xr-x 1 root root   85928 Apr  7 17:00 libz.so.1
./libexec:
total 4
drwxr-xr-x 2 root root 4096 Apr  7 13:35 openssh
./libexec/openssh:
total 0
./testing:
total 0
./usr:
total 12
drwxr-xr-x 2 root root 4096 Apr  7 17:03 bin
drwxr-xr-x 2 root root 4096 Apr  7 14:05 lib64
drwxr-xr-x 3 root root 4096 Apr  7 16:55 libexec
./usr/bin:
total 252
-rwxr-xr-x 1 root root 29712 Apr  7 15:05 rssh
-rwxr-xr-x 1 root root 57504 Apr  7 15:05 scp
-rwxr-xr-x 1 root root 96280 Apr  7 15:05 sftp
-rwxr-xr-x 1 root root 53072 Apr  7 17:03 sftp-server
./usr/lib64:
total 2680
-rwxr-xr-x 1 root root  190976 Apr  7 16:18 libgssapi_krb5.so.2
-rwxr-xr-x 1 root root  153720 Apr  7 16:18 libk5crypto.so.3
-rwxr-xr-x 1 root root  613896 Apr  7 16:18 libkrb5.so.3
-rwxr-xr-x 1 root root   35728 Apr  7 16:18 libkrb5support.so.0
-rwxr-xr-x 1 root root  233112 Apr  7 16:18 libnspr4.so
-rwxr-xr-x 1 root root 1231352 Apr  7 16:18 libnss3.so
-rwxr-xr-x 1 root root  123152 Apr  7 16:18 libnssutil3.so
-rwxr-xr-x 1 root root   17992 Apr  7 16:18 libplc4.so
-rwxr-xr-x 1 root root   13960 Apr  7 16:18 libplds4.so
-rwxr-xr-x 1 root root   85928 Apr  7 20:55 libz.so.1
./usr/libexec:
total 76
drwxr-xr-x 2 root root  4096 Apr  7 13:45 openssh
-rwsr-xr-x 1 root root 67691 Apr  7 16:55 rssh_chroot_helper
./usr/libexec/openssh:
total 56
-rwxr-xr-x 1 root root 53072 Apr  7 15:05 sftp-server
{code}
I am not sure what else to do - can anyone else provide any guidance?</description> <content:encoded><![CDATA[<p>1&gt; To get the rssh system to appear in my log. I followed &#8211; Paul Mitchell comment and added the following line to the sshd.conf. &#8220;Subsystem       sftp    /usr/libexec/openssh/sftp-server&#8221;</p><p>After which the following shows up in my /var/log/messages</p><p>{code}<br
/> Apr  8 09:15:34 test-ftp rssh[11728]: setting log facility to LOG_USER<br
/> Apr  8 09:15:34 test-ftp rssh[11728]: allowing scp to all users<br
/> Apr  8 09:15:34 test-ftp rssh[11728]: allowing sftp to all users<br
/> Apr  8 09:15:34 test-ftp rssh[11728]: setting umask to 022<br
/> Apr  8 09:15:34 test-ftp rssh[11728]: chrooting all users to /users<br
/> Apr  8 09:15:34 test-ftp rssh[11728]: chroot cmd line: /usr/libexec/rssh_chroot_helper 2 &#8220;/usr/libexec/openssh/sftp-server&#8221;<br
/> Apr  8 09:15:34 test-ftp kernel: type=1104 audit(1302250534.943:2545183): user pid=11723 uid=0 auid=526 msg=&#8217;PAM: setcred acct=&#8221;testing&#8221; : exe=&#8221;/usr/sbin/sshd&#8221; (hostname=XX.XX.XX.XX, addr=XX.XX.XX.XX, terminal=ssh res=success)&#8217;<br
/> {code}</p><p>2&gt; followed &#8211; Danilo Mota advise and made my passwd paths in the file relative to the enviroment.</p><p>I am still getting the errors above.</p><p>3&gt; I copied the nesary files sugested in several comments down. content of my /users folder shown below.</p><p>{code}<br
/> drwx&#8212;&#8212; 2 root    root    4096 Apr  7 16:56 bin<br
/> drwxr-x&#8212; 2 root    root    4096 Apr  8 09:36 dev<br
/> drwx&#8212;&#8212; 3 root    root    4096 Apr  7 16:43 etc<br
/> lrwxrwxrwx 1 root    root       5 Apr  7 16:40 lib -&gt; lib64<br
/> drwxr-xr-x 2 root    root    4096 Apr  7 17:02 lib64<br
/> drwxr-xr-x 3 root    root    4096 Apr  7 13:35 libexec<br
/> drwxr-xr-x 2 testing testing 4096 Apr  7 20:57 testing<br
/> drwxr-xr-x 5 root    root    4096 Apr  7 14:05 usr</p><p>./bin:<br
/> total 1576<br
/> -rwx&#8212;&#8212; 1 root root 801512 Apr  7 16:56 bash<br
/> -rwx&#8212;&#8212; 1 root root 801512 Apr  7 16:56 sh</p><p>./dev:<br
/> total 0<br
/> srwxr-x&#8212; 1 root root    0 Apr  8 09:36 log<br
/> crwxr-x&#8212; 1 root root 1, 3 Apr  7 13:35 null</p><p>./etc:<br
/> total 76<br
/> -rwx&#8212;&#8212; 1 root root    36 Apr  8 09:49 group<br
/> -rwx&#8212;&#8212; 1 root root   100 Apr  7 13:37 hosts<br
/> -rwx&#8212;&#8212; 1 root root 47495 Apr  7 15:40 ld.so.cache<br
/> -rwx&#8212;&#8212; 1 root root   280 Apr  7 15:39 ld.so.conf<br
/> drwx&#8212;&#8212; 2 root root  4096 Apr  7 16:43 ld.so.conf.d<br
/> -rwx&#8212;&#8212; 1 root root  1696 Apr  7 15:40 nsswitch.conf<br
/> -rwx&#8212;&#8212; 1 root root    74 Apr  8 09:56 passwd<br
/> -rwx&#8212;&#8212; 1 root root    74 Apr  7 13:37 resolv.conf</p><p>./etc/ld.so.conf.d:<br
/> total 4<br
/> -rwx&#8212;&#8212; 1 root root 17 Oct 23 03:23 mysql-x86_64.conf</p><p>./lib64:<br
/> total 6852<br
/> -rwxr-xr-x 1 root root  139416 Apr  7 14:04 ld-linux-x86-64.so.2<br
/> -rwxr-xr-x 1 root root   10000 Apr  7 16:18 libcom_err.so.2<br
/> -rwxr-xr-x 1 root root 1366272 Apr  7 20:55 libcrypto.so.6<br
/> -rwxr-xr-x 1 root root   48600 Apr  7 20:55 libcrypt.so.1<br
/> -rwxr-xr-x 1 root root 1718120 Apr  7 20:55 libc.so.6<br
/> -rwxr-xr-x 1 root root   23360 Apr  7 20:55 libdl.so.2<br
/> -rwxr-xr-x 1 root root  190976 Apr  7 16:57 libgssapi_krb5.so.2<br
/> -rwxr-xr-x 1 root root  153720 Apr  7 17:01 libk5crypto.so.3<br
/> -rwxr-xr-x 1 root root    9728 Apr  7 16:18 libkeyutils.so.1<br
/> -rwxr-xr-x 1 root root  613896 Apr  7 16:58 libkrb5.so.3<br
/> -rwxr-xr-x 1 root root   35728 Apr  7 17:01 libkrb5support.so.0<br
/> -rwxr-xr-x 1 root root  114352 Apr  7 20:55 libnsl.so.1<br
/> -rwxr-xr-x 1 root root  233112 Apr  7 16:59 libnspr4.so<br
/> -rwxr-xr-x 1 root root 1231352 Apr  7 17:01 libnss3.so<br
/> -rwxr-xr-x 1 root root   53880 Apr  7 16:24 libnss_files-2.5.so<br
/> -rwxr-xr-x 1 root root   53880 Apr  7 16:53 libnss_files.so<br
/> -rwxr-xr-x 1 root root   53880 Apr  8 09:59 libnss_files.so.2<br
/> -rwxr-xr-x 1 root root  123152 Apr  7 17:02 libnssutil3.so<br
/> -rwxr-xr-x 1 root root   17992 Apr  7 16:54 libplc4.so<br
/> -rwxr-xr-x 1 root root   13960 Apr  7 17:00 libplds4.so<br
/> -rwxr-xr-x 1 root root  145824 Apr  7 16:18 libpthread.so.0<br
/> -rwxr-xr-x 1 root root   92736 Apr  7 20:55 libresolv.so.2<br
/> -rwxr-xr-x 1 root root   95464 Apr  7 16:18 libselinux.so.1<br
/> -rwxr-xr-x 1 root root  247496 Apr  7 16:18 libsepol.so.1<br
/> -rwxr-xr-x 1 root root   18152 Apr  7 20:55 libutil.so.1<br
/> -rwxr-xr-x 1 root root   85928 Apr  7 17:00 libz.so.1</p><p>./libexec:<br
/> total 4<br
/> drwxr-xr-x 2 root root 4096 Apr  7 13:35 openssh</p><p>./libexec/openssh:<br
/> total 0</p><p>./testing:<br
/> total 0</p><p>./usr:<br
/> total 12<br
/> drwxr-xr-x 2 root root 4096 Apr  7 17:03 bin<br
/> drwxr-xr-x 2 root root 4096 Apr  7 14:05 lib64<br
/> drwxr-xr-x 3 root root 4096 Apr  7 16:55 libexec</p><p>./usr/bin:<br
/> total 252<br
/> -rwxr-xr-x 1 root root 29712 Apr  7 15:05 rssh<br
/> -rwxr-xr-x 1 root root 57504 Apr  7 15:05 scp<br
/> -rwxr-xr-x 1 root root 96280 Apr  7 15:05 sftp<br
/> -rwxr-xr-x 1 root root 53072 Apr  7 17:03 sftp-server</p><p>./usr/lib64:<br
/> total 2680<br
/> -rwxr-xr-x 1 root root  190976 Apr  7 16:18 libgssapi_krb5.so.2<br
/> -rwxr-xr-x 1 root root  153720 Apr  7 16:18 libk5crypto.so.3<br
/> -rwxr-xr-x 1 root root  613896 Apr  7 16:18 libkrb5.so.3<br
/> -rwxr-xr-x 1 root root   35728 Apr  7 16:18 libkrb5support.so.0<br
/> -rwxr-xr-x 1 root root  233112 Apr  7 16:18 libnspr4.so<br
/> -rwxr-xr-x 1 root root 1231352 Apr  7 16:18 libnss3.so<br
/> -rwxr-xr-x 1 root root  123152 Apr  7 16:18 libnssutil3.so<br
/> -rwxr-xr-x 1 root root   17992 Apr  7 16:18 libplc4.so<br
/> -rwxr-xr-x 1 root root   13960 Apr  7 16:18 libplds4.so<br
/> -rwxr-xr-x 1 root root   85928 Apr  7 20:55 libz.so.1</p><p>./usr/libexec:<br
/> total 76<br
/> drwxr-xr-x 2 root root  4096 Apr  7 13:45 openssh<br
/> -rwsr-xr-x 1 root root 67691 Apr  7 16:55 rssh_chroot_helper</p><p>./usr/libexec/openssh:<br
/> total 56<br
/> -rwxr-xr-x 1 root root 53072 Apr  7 15:05 sftp-server<br
/> {code}</p><p>I am not sure what else to do &#8211; can anyone else provide any guidance?</p> ]]></content:encoded> </item> <item><title>By: Zoltan</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-170515</link> <dc:creator>Zoltan</dc:creator> <pubDate>Thu, 07 Apr 2011 23:40:10 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-170515</guid> <description>I figured it out, it works now. Actually I didn&#039;t figure out what I did wrong but redid everything from zero and then it worked.
Altough I believe there are a few typos in the original instructions and also I needed to copy:
“cp /lib64/libnss_files.so.2 /var/www/lib64/”
Phuh, it took me 10 hours to figure out all issues,</description> <content:encoded><![CDATA[<p>I figured it out, it works now. Actually I didn&#8217;t figure out what I did wrong but redid everything from zero and then it worked.<br
/> Altough I believe there are a few typos in the original instructions and also I needed to copy:<br
/> “cp /lib64/libnss_files.so.2 /var/www/lib64/”</p><p>Phuh, it took me 10 hours to figure out all issues,</p> ]]></content:encoded> </item> <item><title>By: Zoltan</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-170514</link> <dc:creator>Zoltan</dc:creator> <pubDate>Thu, 07 Apr 2011 23:00:48 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-170514</guid> <description>I have RHEL5 64, did everything needed and still stuck at
chroot cmd line: /usr/libexec/rssh_chroot_helper 2 “/usr/libexec/openssh/sftp-server”
I have the user in the passwd file with relative home directory as Danilo proposed.
I can run chroot cmd line: /usr/libexec/rssh_chroot_helper 2 “/usr/libexec/openssh/sftp-server” as root, no error message (after copied chroot/lib64/libnss_files.so.2).
Anybody has any other idea?
Naturally if I remove chrooting from rssh then sftp works fine with this user.</description> <content:encoded><![CDATA[<p>I have RHEL5 64, did everything needed and still stuck at<br
/> chroot cmd line: /usr/libexec/rssh_chroot_helper 2 “/usr/libexec/openssh/sftp-server”</p><p>I have the user in the passwd file with relative home directory as Danilo proposed.</p><p>I can run chroot cmd line: /usr/libexec/rssh_chroot_helper 2 “/usr/libexec/openssh/sftp-server” as root, no error message (after copied chroot/lib64/libnss_files.so.2).</p><p>Anybody has any other idea?<br
/> Naturally if I remove chrooting from rssh then sftp works fine with this user.</p> ]]></content:encoded> </item> <item><title>By: Jp</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-170506</link> <dc:creator>Jp</dc:creator> <pubDate>Thu, 07 Apr 2011 16:45:32 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html#comment-170506</guid> <description>I have tried everything in RHEL5 64, bit to get this working. I have copied all the binnaries and libs to the same folder structure as vukasin. I have even used the default location in the guide. I dont see any message to do with rssh in my /var/log/messages log.
Can someone point me to some helpful troubleshooting tips? Or how to work out why users are able to go up levels and see all the folder structures I have created?</description> <content:encoded><![CDATA[<p>I have tried everything in RHEL5 64, bit to get this working. I have copied all the binnaries and libs to the same folder structure as vukasin. I have even used the default location in the guide. I dont see any message to do with rssh in my /var/log/messages log.</p><p>Can someone point me to some helpful troubleshooting tips? Or how to work out why users are able to go up levels and see all the folder structures I have created?</p> ]]></content:encoded> </item> </channel> </rss>
