chroot shell in Fedora

Rick Stevens rstevens at vitalstream.com
Tue Jan 20 01:46:35 UTC 2004


Bob Byron wrote:
> No, I haven't had the need to create a chroot shell before.  So, I am simply
> trying to setup the simplest configuration.
> 
> David Jackson wrote:
> 
>>>So, why does Fedora not see the passwd and group files?
>>>    
>>>
>>Have  you've gotten this to work on a stock Redhat box?

Of course it won't work.  When you "chroot", you make the specified
directory the root of the filesystem.  "chroot /usr/jail" means
that "/usr/jail" is now "/" for that shell.  It CAN'T traverse back
up the directory tree to the normal /etc, since it doesn't exist for
this shell.

You'd need to copy /etc/passwd, /etc/group, etc. to /usr/jail for the
mnemonics to come up.  This is exactly what you do when you set up a
"secure" anonymous FTP site.

Also note that any program that is NOT built into the shell will also
cease to work, since "/bin", "/usr/bin", etc. are also "above" the
chrooted root directory.
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-            We look for things.  Things that make us go!            -
----------------------------------------------------------------------





More information about the fedora-list mailing list