[CentOS] problems with CentOS chroot

Mon Dec 17 14:59:52 UTC 2007
Filipe Brandenburger <filbranden at gmail.com>

On Dec 17, 2007 9:47 AM, Maxim Soldatov <makc at makc.name> wrote:

> I've got strange problem with centos (as well as rhel btw) chrooted
> environment.


That's the behaviour that chroot is supposed to have.


> Yes, I even do not have /etc/ directory inside testcase/ , but id shows
> groups from the _host_ root account.


I see you saying "host" (as opposed to "guest"), but chroot is not a VM
environment. When you chroot to a jail, you user id, group id, and
additional groups will be still the same as they were before. They're
inherited.

The issue with it showing the id's as numbers or names is that if the files
in /etc/ are not present in the chroot, it won't be able to look them up,
then it will show the numbers only.

If you need some different id's, maybe you should su before/after chrooting.
Or maybe what you need is actually a VM environment, in that case you should
try Xen.

Regards,
Filipe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos/attachments/20071217/1ecb25e2/attachment-0005.html>