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.
pgpd9yXAapzxZ.pgp
Description: OpenPGP digital signature