Gentoo Archives: gentoo-user

From: Bryan Gardiner <bog@××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Proper permissions for /var/log/portage/elog/summary.log?
Date: Tue, 26 Jun 2012 06:59:13
Message-Id: 20120625235610.1a725d9d@khumba.net
In Reply to: Re: [gentoo-user] Proper permissions for /var/log/portage/elog/summary.log? by Michael Mol
1 On Mon, 25 Jun 2012 18:20:22 -0400
2 Michael Mol <mikemol@×××××.com> wrote:
3
4 > On Mon, Jun 25, 2012 at 2:19 PM, Jarry <mr.jarry@×××××.com> wrote:
5 > > I always run emerge as root. But back to my question: on all
6 > > boxes with "A" access rights I can not rotage portage logs.
7 > > All I get is mail from my cron saying: "error setting owner
8 > > of /var/log/portage/elog/summary.log-20110803.gz: Operation
9 > > not permitted..."
10 > >
11 > > On the other side, on boxes with "B" access rights (see above)
12 > > logs are rotated without problem. Logrotate-script is the same:
13 > >
14 > > /var/log/portage/elog/summary.log {
15 > >    su portage portage
16 > >    missingok
17 > >    nocreate
18 > >    delaycompress }
19 > >
20 > > So I suppose either there is something wrong with "A", or logrotate
21 > > script must be modified (although it works for "B")...
22 >
23 > For reference:
24 >
25 > On my laptop:
26 > ls -l /var/log/portage
27 > total 4
28 > drwxrwsr-x 2 portage portage 4096 Dec 29 18:45 elog
29 >
30 >
31 > On a very-fresh-install of Gentoo:
32 >
33 > ls -l /mnt/gentoo/var/log/portage/
34 > total 4
35 > drwxrwsr-x 2 portage portage 4096 Jun 25 14:16 elog
36 >
37 >
38 > It seems to me that the proper permissions for /var/log/portage/elog
39 > are likely:
40 > * chmod 0775
41 > * chown portage.portage
42
43 Agreed that these are the correct permissions (setgid seems sensible
44 too). Bug #374287 talks about this ownership a bit. Also, when
45 /usr/lib/portage/pym/portage/elog/mod_save.py is invoked, it copies
46 the gid down to /var/log/portage/elog from /var/log/portage, so
47 mystery mostly solved... But what accounts for the difference in
48 ownership of /var/log/portage? :)
49
50 - Bryan

Replies

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