[smokeping-users] [BUG] setting umask for new RRD files
Tobias Oetiker
tobi at oetiker.ch
Thu May 6 15:23:44 CEST 2010
Hi Alex,
Today Alex wrote:
> On Tuesday 04 May 2010, Tobias Oetiker wrote:
> > Today Thomas Lobker wrote:
> > > For some reason Smokeping is forcing a umask 022 on the data
> > > folder
> >
> > you should be using suexec so that the cgi runs as the same user as
> > the daemon ...
>
> Why is smokeping setting the umask at all? By doing that it is deliberately
> breaking standard behaviour. If this command is removed from smokeping,
> users can let smokeping create files with the permissions _they_ want, not
> an _arbitrary_ and unconfigurable value which only works in one particular
> environment.
>
> Patch to fix this issue:
>
> diff -u Smokeping.pm~ Smokeping.pm
> --- Smokeping.pm~ 2010-05-04 15:41:55.000000000 +0200
> +++ Smokeping.pm 2010-05-04 15:41:55.000000000 +0200
> @@ -4033,7 +4033,6 @@
>
> sub main (;$) {
> $cgimode = 0;
> - umask 022;
> my $defaultcfg = shift;
> $opt{filter}=[];
> GetOptions(\%opt, 'version', 'email', 'man:s','help','logfile=s','static-pages:s', 'debug-daemon',
>
the umask is being set because we found that many people ran into
trouble because their default umask settings were too tight and
thus the web smokeping was not able to read the rrd files written
by the daemon ... I'll be glat to incorporate your patch if it did
not remove the fix for that problem ...
cheers
tobi
--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900
More information about the smokeping-users
mailing list