MDL-40642 set more restrictive umask and use proper permission for new dirs and files
This commit is contained in:
+6
-2
@@ -282,8 +282,12 @@ if (!isset($CFG->directorypermissions)) {
|
||||
if (!isset($CFG->filepermissions)) {
|
||||
$CFG->filepermissions = ($CFG->directorypermissions & 0666); // strip execute flags
|
||||
}
|
||||
// better also set default umask because recursive mkdir() does not apply permissions recursively otherwise
|
||||
umask(0000);
|
||||
// Better also set default umask because developers often forget to include directory
|
||||
// permissions in mkdir() and chmod() after creating new files.
|
||||
if (!isset($CFG->umaskpermissions)) {
|
||||
$CFG->umaskpermissions = (($CFG->directorypermissions & 0777) ^ 0777);
|
||||
}
|
||||
umask($CFG->umaskpermissions);
|
||||
|
||||
// exact version of currently used yui2 and 3 library
|
||||
$CFG->yui2version = '2.9.0';
|
||||
|
||||
Reference in New Issue
Block a user