Item9928: Gauge plugin changes the umask to hardcoded 002 - which can break other extensions.
Priority: Urgent
Current State: Needs Developer
Released In: n/a
Target Release: n/a
GaugePlugin should set the umask to 777 - {RCS}{dirPermissions}
GaugePlugin.pm sets umask to 002. This will cause directories created by other extensions to potentially have broader permissions than intended by the configure settings.
Suggested code: umask( oct(777) - $Foswiki::cfg{RCS}{dirPermission} );
--
GeorgeClark - 30 Oct 2010
Thanks. Now fixed.
--
AndrewJones - 04 May 2011
Reopened for current Foswiki Version where dirPermission is defined in Store, not RCS!
The relevant umask related lines should be changed to
if ( !-e "$dir" ) {
umask( oct(777) - $Foswiki::cfg{Store}{dirPermission} );
mkdir( $dir, 0755 );
}
if ( !-e "$tempPath" ) {
umask( oct(777) - $Foswiki::cfg{Store}{dirPermission} );
mkdir( $tempPath, 0755 );
}
and
umask( oct(777) - $Foswiki::cfg{Store}{filePermission} );
open( IMAGE, ">", "$dir/$filename" )
|| return _make_error "Can't create '$dir/$filename': $!";
respectively when writing the image file (don't forget the code lines for debug mode too!).
And by the way, there's another typo in the code
sub _make_gauge {
my ( $sesstion,
should be
sub _make_gauge {
my ( $session,
(mind the additional
t
)
Cheers!
--
FranzJosefGigler - 24 Apr 2015