[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: chroot_bug_??

From: Bob Proulx
Subject: Re: chroot_bug_??
Date: Thu, 12 Sep 2002 21:35:28 -0600
User-agent: Mutt/1.4i

xx <address@hidden> [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

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]