MDL-40642 set more restrictive umask and use proper permission for new dirs and files
This commit is contained in:
@@ -626,6 +626,7 @@ function is_dataroot_insecure($fetchtest=false) {
|
||||
$testfile = $CFG->dataroot.'/diag/public.txt';
|
||||
if (!file_exists($testfile)) {
|
||||
file_put_contents($testfile, 'test file, do not delete');
|
||||
@chmod($testfile, $CFG->filepermissions);
|
||||
}
|
||||
$teststr = trim(file_get_contents($testfile));
|
||||
if (empty($teststr)) {
|
||||
|
||||
Reference in New Issue
Block a user