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

This commit is contained in:
Petr Škoda
2013-07-13 19:54:50 +02:00
parent ffc3f5308b
commit eb459f7192
25 changed files with 52 additions and 15 deletions

View File

@@ -2544,6 +2544,7 @@ function put_records_csv($file, $records, $table = NULL) {
}
fclose($fp);
@chmod($CFG->tempdir.'/'.$file, $CFG->filepermissions);
return true;
}
@@ -3714,6 +3715,7 @@ class curl_cache {
$fp = fopen($this->dir.$filename, 'w');
fwrite($fp, serialize($val));
fclose($fp);
@chmod($this->dir.$filename, $CFG->filepermissions);
}
/**