On 10/02/2014 19:29, Alan McKinnon wrote:
On 10/02/2014 21:03, Walter Dnes wrote:
>On Mon, Feb 10, 2014 at 05:09:55PM +0000, Stroller wrote
>>
>>On Mon, 10 February 2014, at 4:55 pm, Gleb Klochkov<glebiu...@gmail.com>
wrote:
>>
>>>Hi. Try to use sudo with no password for eix-sync.
>>
>>I'd really rather not. Thanks, though.
>
> Being in group "portage" is not enough. That merely lets you do
>emerges with "--pretend". "emerge --sync" modifies files in
>/usr/portage. Files and directories in /usr/portage/ are user:group
>root:root. Therefore you*NEED* root-level permission to modify them.
Not quite, it's not a cut and dried as that. If root chowns the files to
a regular user, and that user then syncs, ownership remains with the
user (as a regular user can't chown stuff and the owner must remain the
user regardless of what the master tree reckons the owning uid is).
If the tree is then synced by root, well then all the problems come back
It won't cause any problems. The effect of usersync is defined as thus:
"Drop privileges to the owner of PORTDIR for emerge(1)."
Hence, emerge --sync run as root will execute rsync as the portage user,
assuming that PORTDIR is owned by that very same user.
It can only be problematic if all of these conditions hold true:
* usersync is enabled (as it is by default)
* PORTDIR is owned by a non-root user
* The ownership is not consistent across PORTDIR and its children
As mentioned in a few other posts, recent snapshots are portage:portage
throughout so it's a done deal for new installations. Those who still
have it owned by root can benefit from usersync simply by running:
# chown -R portage:portage "$(portageq envvar PORTDIR)"
There is no subsequent requirement not to invoke emerge --sync as root.
--Kerin