Re: installing a PPC RPM on my local system (just for a test)

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

 



On Wed, Dec 17, 2003 at 12:56:18PM -0500, Robert P. J. Day wrote:
>   why did the chroot() call fail just because i was a regular user?  i gave,
> as an argument to --root=, a directory for which i as a regular user have
> full permission.  is there something about running a chroot()-based command
> as non-root that causes it to fail?
> 
It failed because it's not allowed. Look at chroot(2), you get -EPERM when:

       EPERM  The effective UID is not zero.

as such, you aren't ever allowed to do this as a user. There's also good
reasons for this, for example, assume that someone has built a chroot jail
for users logging in remotely or some such thing, if the user has the ability
to chroot(), they can easily break out of it. I believe the BSD jail(2) deals
with this in a somewhat more sensible fashion.

>   i su'ed, and the install to the same directory worked fine.  but i don't *want*
> to have to su.  i'm trying to build an NFS-mounted root filesystem on my
> system, and i don't want to require root privilege.  and that makes it 
> essential that i be able to install this way as a regular user.
> 
>   thoughts?
> 
Rethink your design? Abusing chroot() definitely isn't anything you want to do,
so you're best bet is to either do this stuff as root, or do this some other
way (rpm2cpio maybe?).

Attachment: pgp00013.pgp
Description: PGP signature


[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux