[Pacemaker] crm_mon --as-html default permissions

Andrew Beekhof andrew at beekhof.net
Mon Feb 17 19:38:20 EST 2014

On 12 Feb 2014, at 9:53 pm, Marko Potocnik <marko.potocnik at gmail.com> wrote:

> Hi,
> I've upgraded from pacemaker-1.1.7-6.el6.x86_64 to pacemaker-1.1.10-14.el6_5.2.x86_64.
> I use crm_mon with --as-html option to get the cluster status in html file. I've noticed that the permissions for file have changed from 644 to 640. Looking at source code I see that umask is set to reflect the 640 permissions, but not for crm_mon.
> default system umask is set to 0022 (644 permission).
> Any idea why I get the 640 permissions?

There doesn't seem to be anything explicit in the crm_mon code. Just a call to fopen()

       Any created files will have mode S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH (0666), as modified by the process's umask value (see umask(2)).

However, it seems all code runs the following in crm_log_init():

    umask(S_IWGRP | S_IWOTH | S_IROTH);

which could well be the cause
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20140218/71473bd6/attachment-0003.sig>

More information about the Pacemaker mailing list