MDL-40642 set more restrictive umask and use proper permission for new dirs and files

This commit is contained in:
Petr Škoda
2013-07-19 09:18:44 +02:00
parent ffc3f5308b
commit eb459f7192
25 changed files with 52 additions and 15 deletions
+1
View File
@@ -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)) {