Re: Pmlogger directory permissions

"Ken McDonell" <[email protected]> Tue, 31 Jan 2017 07:32:27 +1100
Newsgroups gmane.comp.sysutils.pcp
Message-ID <[email protected]>
Excellent analysis Martins.

On 31/01/17 05:33, Martins Innus wrote:
> ... 1.  In the default crontab setup, each day pmlogger_daily runs
> before pmlogger_check.  While they share similar code, only
> pmlogger_check has the code  to actually create the directory
> specified in the control file. Not sure if this should be added into
> the daily file, or if this was left out intentionally.

That is an error, that I'll fix.  The order of execution should be 
immaterial, which means any mkdir/chown activity in pmlogger_check 
should be replicated in pmlogger_daily.

> ...
> 2.  The systemd/init scripts run as root.  So even though the
> pmlogger startup script calls pmlogger_check, since it runs as root,
> the directory tree gets created with root permissions.  There is a
> single chown to fix the leaf directory.  But the parents are still
> owned by root.

That is another error that I'll fix.  The mkdir logic needs to be 
smarter to mkdir/chown each of the missing directory components it is 
creating.

Thanks.

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links:

You receive all messages sent to this group.

View/Reply Online (#15050): https://groups.io/g/pcp/message/15050
View All Messages In Topic (2): https://groups.io/g/pcp/topic/4288595
Mute This Topic: https://groups.io/mt/4288595?uid=174580
New Topic: https://groups.io/g/pcp/post
-=-=-
pcp mailing list
[email protected]
https://groups.io/g/pcp/messages
-=-=-
Change Your Subscription: https://groups.io/g/pcp/editsub?uid=174580
Group Home: https://groups.io/g/pcp
Contact Group Owner: [email protected]
Terms of Service: https://groups.io/static/tos
Unsubscribe: https://groups.io/g/pcp/leave/354243/563757577/xyzzy
-=-=-=-=-=-=-=-=-=-=-=-