xx <[EMAIL PROTECTED]> [2002-09-10 14:22:28 +0200]:
> F.i. #md /usr/local/test . Then a chroot /usr/local/test (as root)
> merely reports the error Cannot execute /bin/bash no such file
> or directory, though "/bin/bash" is correctly located. Chroot reads the
> correct SHELL environment entry.
> "chroot /" works but this makes no sense at all, i think.
> I don't think that there is necessarily a bug with chroot,
> but i'm also wondering what's going wrong.

When you chroot you are completely changing the root of the filesystem
for that process to NEWROOT.  Which may seem obvious but it is an FAQ
that people don't realize that.  All of your commands, shared
libraries and configuration file etc. all must exist under that
chroot.

When you are seeing /bin/bash no such file or directory after doing a
chroot to /usr/local/test it means that there is no
/usr/local/test/bin/bash located there.  Also, you will need any
shared libraries that bash needs.  Run 'ldd' on bash and see the
list.  It is usually easier to to fully bound non-shared executables
instead of shared for this reason.

Generally creating a chroot area is more difficult to do correctly
then people at first think.

Bob



_______________________________________________
Bug-sh-utils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-sh-utils

Reply via email to