Commit d99bab2d authored by moodler's avatar moodler
Browse files

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.
parent b63c0ee5
......@@ -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;
//=========================================================================
......
......@@ -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";
......
......@@ -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
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment