Gentoo Archives: gentoo-user

From: Michael Mol <mikemol@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Proper permissions for /var/log/portage/elog/summary.log?
Date: Mon, 25 Jun 2012 22:21:57
Message-Id: CA+czFiBMhTf9-k8Skb6_aN_RQycx=StBAL0hCr3TW-i+c2-O=A@mail.gmail.com
In Reply to: Re: [gentoo-user] Proper permissions for /var/log/portage/elog/summary.log? by Jarry
1 On Mon, Jun 25, 2012 at 2:19 PM, Jarry <mr.jarry@×××××.com> wrote:
2 > On 24-Jun-12 20:27, Dale wrote:
3 >>>
4 >>> I have just checked my machines and I found I have basically
5 >>> two groups of settings ("ls -al" in /var/log/portage/elog/):
6 >>>
7 >>> A)
8 >>> drwxrws--- 2 portage root     4096 Jun 24 03:10 .
9 >>> drwxr-xr-x 3 root    root     4096 Apr  7  2009 ..
10 >>> -rw-rw-r-- 1 portage root    57760 Jun 22 15:11 summary.log
11 >>>
12 >>> B)
13 >>> drwxrwsr-x 2 portage portage 4096 Jun 24 13:30 .
14 >>> drwxrws--- 3 portage portage 4096 Nov  3  2011 ..
15 >>> -rw-rw-r-- 1 portage portage 1132 Jun 22 17:28 summary.log
16 >>>
17 >>> So is the "B-version" correct one?
18 >>
19 >>
20 >> This is my thinking on why it may be different for different folks.
21 >> This first tho.  I run emerge as root.  I have not added my regular user
22 >> to the portage group.  I have no memory of messing with the permissions
23 >> either.
24 >>
25 >> I think that if you use a regular user to emerge some things, it gets
26 >> set to portage:portage or some mix of portage:root.  If you always run
27 >> emerge as root, then you get root:root.  It may be that this is only set
28 >> once or that it could be modified if you run as root then later on run
29 >> as a user.
30 >
31 >
32 > I always run emerge as root. But back to my question: on all
33 > boxes with "A" access rights I can not rotage portage logs.
34 > All I get is mail from my cron saying: "error setting owner
35 > of /var/log/portage/elog/summary.log-20110803.gz: Operation
36 > not permitted..."
37 >
38 > On the other side, on boxes with "B" access rights (see above)
39 > logs are rotated without problem. Logrotate-script is the same:
40 >
41 > /var/log/portage/elog/summary.log {
42 >    su portage portage
43 >    missingok
44 >    nocreate
45 >    delaycompress }
46 >
47 > So I suppose either there is something wrong with "A", or logrotate
48 > script must be modified (although it works for "B")...
49
50 For reference:
51
52 On my laptop:
53 ls -l /var/log/portage
54 total 4
55 drwxrwsr-x 2 portage portage 4096 Dec 29 18:45 elog
56
57
58 On a very-fresh-install of Gentoo:
59
60 ls -l /mnt/gentoo/var/log/portage/
61 total 4
62 drwxrwsr-x 2 portage portage 4096 Jun 25 14:16 elog
63
64
65 It seems to me that the proper permissions for /var/log/portage/elog are likely:
66 * chmod 0775
67 * chown portage.portage
68
69 --
70 :wq

Replies

Subject Author
Re: [gentoo-user] Proper permissions for /var/log/portage/elog/summary.log? Bryan Gardiner <bog@××××××.net>