From: moodler Date: Sat, 21 Aug 2004 13:27:44 +0000 (+0000) Subject: Try to apply sensible file permissions to the new config.php X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=7c561c7a251e3576c4bf53f9dbae030b9f0fefdb;p=moodle.git Try to apply sensible file permissions to the new config.php --- diff --git a/install.php b/install.php index 59a8dff759..fdc346888d 100644 --- a/install.php +++ b/install.php @@ -303,10 +303,13 @@ if ($nextstage == 5) { $str .= '// RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.'."\r\n"; $str .= '?>'; + umask(0137); + if (( $configsuccess = ($fh = @fopen($configfile, 'w')) ) !== false) { fwrite($fh, $str); fclose($fh); } + $INSTALL['config'] = $str; } @@ -577,6 +580,7 @@ function form_table($nextstage = 0, $formaction = "install.php") { \n" : " \n" ?> 0) ? "\n" : " \n" ?> +