Some changes that may help on safe mode ... see bug 2093
The new directory permissions maintain group mode better, and the manual chown is now removed to prevent safe mode from getting upset.
This commit is contained in:
+1
-1
@@ -110,7 +110,7 @@ $CFG->dataroot = '/home/example/moodledata';
|
||||
// to make sure the web server process (eg Apache) can access the files.
|
||||
// NOTE: the prefixed 0 is important, and don't use quotes.
|
||||
|
||||
$CFG->directorypermissions = 0777;
|
||||
$CFG->directorypermissions = 02777;
|
||||
|
||||
|
||||
//=========================================================================
|
||||
|
||||
+2
-2
@@ -68,7 +68,7 @@ if ( empty($INSTALL['language']) and empty($_POST['language']) ) {
|
||||
$SESSION->lang = (!empty($_POST['language'])) ? $_POST['language'] : $INSTALL['language'];
|
||||
$CFG->dirroot = $INSTALL['dirroot'];
|
||||
$CFG->dataroot = $INSTALL['dataroot'];
|
||||
$CFG->directorypermissions = 0777;
|
||||
$CFG->directorypermissions = 02777;
|
||||
|
||||
|
||||
/// Include some moodle libraries
|
||||
@@ -306,7 +306,7 @@ if ($nextstage == 5) {
|
||||
$str .= '$CFG->admin = \''.$INSTALL['admindirname']."';\r\n";
|
||||
$str .= "\r\n";
|
||||
|
||||
$str .= '$CFG->directorypermissions = 0777;'."\r\n";
|
||||
$str .= '$CFG->directorypermissions = 02777;'."\r\n";
|
||||
$str .= "\r\n";
|
||||
|
||||
$str .= 'require_once("$CFG->dirroot/lib/setup.php");'."\r\n";
|
||||
|
||||
+1
-1
@@ -2579,7 +2579,7 @@ function make_upload_directory($directory, $shownotices=true) {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@chmod($currdir, $CFG->directorypermissions); // Just in case mkdir didn't do it
|
||||
//@chmod($currdir, $CFG->directorypermissions); // Just in case mkdir didn't do it
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user