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