--- includes/GlobalFunctions.php 2006-05-23 12:27:25.000000000 +0200 +++ ../public_html/includes/GlobalFunctions.php 2006-06-09 11:14:37.664465762 +0200 @@ -1477,15 +1477,18 @@ function wfMkdirParents( $fullDir, $mode ) { $parts = explode( '/', $fullDir ); $path = ''; + $umask = umask(0); foreach ( $parts as $dir ) { $path .= $dir . '/'; if ( !is_dir( $path ) ) { if ( !mkdir( $path, $mode ) ) { + umask($umask); return false; } } } + umask($umask); return true; } --- includes/Math.php 2006-05-23 12:27:27.000000000 +0200 +++ ../public_html/includes/Math.php 2006-06-09 11:23:55.776940799 +0200 @@ -131,7 +131,7 @@ return $this->_error( 'math_bad_output' ); } - if( !rename( "$wgTmpDirectory/{$this->hash}.png", "$hashpath/{$this->hash}.png" ) ) { + if( !chmod("$wgTmpDirectory/{$this->hash}.png", 0644) || !rename( "$wgTmpDirectory/{$this->hash}.png", "$hashpath/{$this->hash}.png" ) ) { return $this->_error( 'math_output_error' ); }