public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Question about initial/default ownership of /usr/portage
@ 2015-10-03  3:48 Raymond Jennings
  2015-10-03  4:08 ` Philip Webb
  2015-10-03  8:26 ` Neil Bothwick
  0 siblings, 2 replies; 6+ messages in thread
From: Raymond Jennings @ 2015-10-03  3:48 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 37 bytes --]

Who is supposed to own /usr/portage?

[-- Attachment #2: Type: text/html, Size: 73 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] Question about initial/default ownership of /usr/portage
  2015-10-03  3:48 [gentoo-user] Question about initial/default ownership of /usr/portage Raymond Jennings
@ 2015-10-03  4:08 ` Philip Webb
  2015-10-03  8:26 ` Neil Bothwick
  1 sibling, 0 replies; 6+ messages in thread
From: Philip Webb @ 2015-10-03  4:08 UTC (permalink / raw
  To: gentoo-user

151002 Raymond Jennings wrote:
> Who is supposed to own /usr/portage?

On my system, it's 'portage:portage'.

-- 
========================,,============================================
SUPPORT     ___________//___,   Philip Webb
ELECTRIC   /] [] [] [] [] []|   Cities Centre, University of Toronto
TRANSIT    `-O----------O---'   purslowatchassdotutorontodotca



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] Question about initial/default ownership of /usr/portage
  2015-10-03  3:48 [gentoo-user] Question about initial/default ownership of /usr/portage Raymond Jennings
  2015-10-03  4:08 ` Philip Webb
@ 2015-10-03  8:26 ` Neil Bothwick
  2015-10-03  8:40   ` Alan McKinnon
  1 sibling, 1 reply; 6+ messages in thread
From: Neil Bothwick @ 2015-10-03  8:26 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 302 bytes --]

On Fri, 2 Oct 2015 20:48:06 -0700, Raymond Jennings wrote:

> Who is supposed to own /usr/portage?

This was discussed in some detail two weeks ago. Search for the thread
entitled "portage directory ownerships?".


-- 
Neil Bothwick

All mail what i send is thoughly proof-red, definately!

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] Question about initial/default ownership of /usr/portage
  2015-10-03  8:26 ` Neil Bothwick
@ 2015-10-03  8:40   ` Alan McKinnon
  2015-10-03  9:35     ` Neil Bothwick
  0 siblings, 1 reply; 6+ messages in thread
From: Alan McKinnon @ 2015-10-03  8:40 UTC (permalink / raw
  To: gentoo-user

On 03/10/2015 10:26, Neil Bothwick wrote:
> On Fri, 2 Oct 2015 20:48:06 -0700, Raymond Jennings wrote:
> 
>> Who is supposed to own /usr/portage?
> 
> This was discussed in some detail two weeks ago. Search for the thread
> entitled "portage directory ownerships?".
> 
> 


There's an aspect of that we didn't discuss 2 weeks ago.

The answer to the OP's question is, as always, "it depends".
From man 5 make.conf, section "FEATURES":

              userfetch
                     When  portage  is  run  as root, drop privileges to
                     portage:portage  during  the  fetching  of  package
                     sources.

              userpriv
                     Allow  portage  to drop root privileges and compile
                     packages  as  portage:portage  without  a   sandbox
                     (unless usersandbox is also used).

              usersandbox
                     Enable  the sandbox in the compile phase, when run‐
                     ning without root privs (userpriv).

              usersync
                     Drop privileges to the owner of  ${repository_loca‐
                     tion}  for  emerge(1)  --sync operations. Note that
                     this feature assumes  that  all  subdirectories  of
                     ${repository_location}  have  the same ownership as
                     ${repository_location} itself.  It  is  the  user's
                     responsibility  to  ensure correct ownership, since
                     otherwise Portage would have to waste time validat‐
                     ing ownership for each and every sync operation.


So logically, if user* is in FEATURES then $PORTDIR should be
portage:portage
If emerge --sync is done as user alan, then all repos ($PORTDIR, local
overlays, layman overlays) need to be owned by alan:

if user* is not in FEATURES and everything gets run as root, then
PORTDIR, DISTDIR and so on can be root:root.

The point is, there really isn't a "owner:group /should/ be" rule for
portage data, the admin needs to make it whatever he needs it to be.

-- 
Alan McKinnon
alan.mckinnon@gmail.com



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] Question about initial/default ownership of /usr/portage
  2015-10-03  8:40   ` Alan McKinnon
@ 2015-10-03  9:35     ` Neil Bothwick
  2015-10-03  9:57       ` Dale
  0 siblings, 1 reply; 6+ messages in thread
From: Neil Bothwick @ 2015-10-03  9:35 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 3003 bytes --]

On Sat, 3 Oct 2015 10:40:42 +0200, Alan McKinnon wrote:

> On 03/10/2015 10:26, Neil Bothwick wrote:
> > On Fri, 2 Oct 2015 20:48:06 -0700, Raymond Jennings wrote:
> >   
> >> Who is supposed to own /usr/portage?  
> > 
> > This was discussed in some detail two weeks ago. Search for the thread
> > entitled "portage directory ownerships?".
> > 
> >   
> 
> 
> There's an aspect of that we didn't discuss 2 weeks ago.
> 
> The answer to the OP's question is, as always, "it depends".
> From man 5 make.conf, section "FEATURES":
> 
>               userfetch
>                      When  portage  is  run  as root, drop privileges to
>                      portage:portage  during  the  fetching  of  package
>                      sources.
> 
>               userpriv
>                      Allow  portage  to drop root privileges and compile
>                      packages  as  portage:portage  without  a   sandbox
>                      (unless usersandbox is also used).
> 
>               usersandbox
>                      Enable  the sandbox in the compile phase, when run‐
>                      ning without root privs (userpriv).
> 
>               usersync
>                      Drop privileges to the owner of  ${repository_loca‐
>                      tion}  for  emerge(1)  --sync operations. Note that
>                      this feature assumes  that  all  subdirectories  of
>                      ${repository_location}  have  the same ownership as
>                      ${repository_location} itself.  It  is  the  user's
>                      responsibility  to  ensure correct ownership, since
>                      otherwise Portage would have to waste time validat‐
>                      ing ownership for each and every sync operation.
> 
> 
> So logically, if user* is in FEATURES then $PORTDIR should be
> portage:portage
> If emerge --sync is done as user alan, then all repos ($PORTDIR, local
> overlays, layman overlays) need to be owned by alan:
> 
> if user* is not in FEATURES and everything gets run as root, then
> PORTDIR, DISTDIR and so on can be root:root.

That's interesting, but I think only the last one applies to $POSTDIR.
userfetch applies to $DISTDIR, which may or may not be within $PORTDIR
while the others relate to compiling so should only affect transient
directories in $PORTAGE_TMPDIR.

> The point is, there really isn't a "owner:group /should/ be" rule for
> portage data, the admin needs to make it whatever he needs it to be.

The default though is for all four of those features to be set, so
you would expect $PORTDIR to be portage:portage, yet on this recent
install it is root:root. The local portage mirror it syncs from is
portage:portage.

I'm beginning to think portage is female and all attempts to understand it
are futile...


-- 
Neil Bothwick

Give a man a fish and you feed him for a day; teach him
to use the Net and he won't bother you for weeks.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] Question about initial/default ownership of /usr/portage
  2015-10-03  9:35     ` Neil Bothwick
@ 2015-10-03  9:57       ` Dale
  0 siblings, 0 replies; 6+ messages in thread
From: Dale @ 2015-10-03  9:57 UTC (permalink / raw
  To: gentoo-user

Neil Bothwick wrote:
> I'm beginning to think portage is female and all attempts to
> understand it are futile... 


You to huh?  Every time I think I got something figured out, it throws a
curve ball at me and hits me in the forehead.  I don't like eating dirt.

o_O

Dale

:-)  :-) 


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-10-03  9:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-03  3:48 [gentoo-user] Question about initial/default ownership of /usr/portage Raymond Jennings
2015-10-03  4:08 ` Philip Webb
2015-10-03  8:26 ` Neil Bothwick
2015-10-03  8:40   ` Alan McKinnon
2015-10-03  9:35     ` Neil Bothwick
2015-10-03  9:57       ` Dale

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox