[Pacemaker] crm_mon --as-html default permissions

Marko Potocnik marko.potocnik at gmail.com
Fri Feb 21 15:18:30 UTC 2014


I found the umask code after further inspection. Solution was chmod from
php right before html output from crm_mon is read.


On Tue, Feb 18, 2014 at 1:38 AM, Andrew Beekhof <andrew at beekhof.net> wrote:

>
> 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
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20140221/d9a23b07/attachment.htm>


More information about the Pacemaker mailing list