pcp
[Top] [All Lists]

Re: [pcp] pcp files/dirs in /etc not owned by root

To: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Subject: Re: [pcp] pcp files/dirs in /etc not owned by root
From: Nathan Scott <nathans@xxxxxxxxxx>
Date: Wed, 24 Sep 2014 19:01:45 -0400 (EDT)
Cc: PCP <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <54234B15.1050901@xxxxxxxxxxxxxxxx>
References: <54234B15.1050901@xxxxxxxxxxxxxxxx>
Reply-to: Nathan Scott <nathans@xxxxxxxxxx>
Thread-index: FDMe2rCBVYw12IHr6FE4pmTxqsBqug==
Thread-topic: pcp files/dirs in /etc not owned by root
Hi Ken,

----- Original Message -----
> Just picking up on a short irc exchange from a couple of days ago ...
> 
> Now we're certainly out on a limb here ...
> 
> kenj@bozo:~/src/pcp/src/pmie$ sudo find /etc ! -user root
> /etc/apt-cacher-ng/security.conf
> /etc/pcp/pmlogger
> /etc/pcp/pmlogger/control
> /etc/pcp/pmlogger/config.default
> /etc/pcp/pmcd/pmcd.options
> /etc/pcp/pmie
> /etc/pcp/pmie/control
> /etc/pcp/pmie/config.default
> /etc/bind/rndc.key
> 
> I've done some investigation and have explanations, but no solutions ...
> so this is open for discussion.
> 
> /etc/pcp/pmie/control and /etc/pcp/pmlogger/control could probably be
> changed to root.root, mode 644 without anything bad happening.

Yep, sounds good.

> But /etc/pcp/pmie/config.default and /etc/pcp/pmlogger/config.default
> are messier.  These do not (and cannot) come from the packaging, they
> are created dynamically in one-trip code using pmieconf and pmlogconf
> ... and in the process of that creation there is a chown pcp:pcp which I
> don't think is necessary, but that seems to have triggered the pcp:pcp
> ownership of the enclosing directories (again not necessary).

There is one problem here - the cron scripts run as the user pcp and it
is possible that they will need to generate config.default.  Thus they
will either need to change back to running as root, or they will need to
be able to write those two files in those two directories.

Other than that little quirk, I think this is a great idea.

cheers.

--
Nathan

<Prev in Thread] Current Thread [Next in Thread>