On Mon, Jun 25, 2012 at 2:19 PM, Jarry <mr.ja...@gmail.com> wrote:
> On 24-Jun-12 20:27, Dale wrote:
>>>
>>> I have just checked my machines and I found I have basically
>>> two groups of settings ("ls -al" in /var/log/portage/elog/):
>>>
>>> A)
>>> drwxrws--- 2 portage root     4096 Jun 24 03:10 .
>>> drwxr-xr-x 3 root    root     4096 Apr  7  2009 ..
>>> -rw-rw-r-- 1 portage root    57760 Jun 22 15:11 summary.log
>>>
>>> B)
>>> drwxrwsr-x 2 portage portage 4096 Jun 24 13:30 .
>>> drwxrws--- 3 portage portage 4096 Nov  3  2011 ..
>>> -rw-rw-r-- 1 portage portage 1132 Jun 22 17:28 summary.log
>>>
>>> So is the "B-version" correct one?
>>
>>
>> This is my thinking on why it may be different for different folks.
>> This first tho.  I run emerge as root.  I have not added my regular user
>> to the portage group.  I have no memory of messing with the permissions
>> either.
>>
>> I think that if you use a regular user to emerge some things, it gets
>> set to portage:portage or some mix of portage:root.  If you always run
>> emerge as root, then you get root:root.  It may be that this is only set
>> once or that it could be modified if you run as root then later on run
>> as a user.
>
>
> I always run emerge as root. But back to my question: on all
> boxes with "A" access rights I can not rotage portage logs.
> All I get is mail from my cron saying: "error setting owner
> of /var/log/portage/elog/summary.log-20110803.gz: Operation
> not permitted..."
>
> On the other side, on boxes with "B" access rights (see above)
> logs are rotated without problem. Logrotate-script is the same:
>
> /var/log/portage/elog/summary.log {
>    su portage portage
>    missingok
>    nocreate
>    delaycompress }
>
> So I suppose either there is something wrong with "A", or logrotate
> script must be modified (although it works for "B")...

For reference:

On my laptop:
ls -l /var/log/portage
total 4
drwxrwsr-x 2 portage portage 4096 Dec 29 18:45 elog


On a very-fresh-install of Gentoo:

ls -l /mnt/gentoo/var/log/portage/
total 4
drwxrwsr-x 2 portage portage 4096 Jun 25 14:16 elog


It seems to me that the proper permissions for /var/log/portage/elog are likely:
* chmod 0775
* chown portage.portage

-- 
:wq

Reply via email to