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:
moodler 2004-12-26 14:45:39 +00:00
parent b63c0ee521
commit d99bab2d1d
3 changed files with 4 additions and 4 deletions

View File

@ -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;
//=========================================================================

View File

@ -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";

View File

@ -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
}
}