Ask Your Question
2

How am I able to create a chroot with mock (without being root)?

asked 2014-08-26 19:11:26 -0600

1024 gravatar image

updated 2014-08-27 07:06:23 -0600

Everything that I have found says that only root can create a chroot. If this is true how does mock create a chroot? I suspect it might have something to do with /etc/pam.d/mock and that the user running mock needs to be part of the mock group however it is not entirely clear to me how this possible.

To clarify, I am able to use mock, it works great I'm just curious if anyone can shed some light on it's implementation (chroot-making magic).

edit retag flag offensive close merge delete

Comments

Simple, Is similar as the command fakeroot... http://man.he.net/man1/fakeroot

davidva gravatar imagedavidva ( 2014-08-27 12:12:36 -0600 )edit

fakeroot looks very interesting but It doesn't look like fakeroot is required by mock: https://git.fedorahosted.org/cgit/mock.git/tree/mock.spec

1024 gravatar image1024 ( 2014-08-28 11:51:35 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-08-27 00:34:09 -0600

FranciscoD_ gravatar image

Not really sure. When we use mock, we add our users to the mock group which enables mock to create the chroot in /var/lib/mock.

http://fedoraproject.org/wiki/Using_Mock_to_test_package_builds

edit flag offensive delete link more

Comments

Thanks for submitting an answer, I should clarify that I don't have any trouble running mock I'm jut curious as to how it gets away with creating a chroot without being root.

1024 gravatar image1024 ( 2014-08-27 07:08:42 -0600 )edit

Question Tools

Stats

Asked: 2014-08-26 19:11:26 -0600

Seen: 310 times

Last updated: Aug 27 '14