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.mckin...@gmail.com


Reply via email to