mode 0640 for PDFs and certificates in tmp folder

This commit is contained in:
Roland Gruber 2015-06-18 18:16:00 +00:00
parent 5c5a2c4588
commit 4e8fe408b7
2 changed files with 2 additions and 2 deletions

View File

@ -1875,7 +1875,7 @@ class inetOrgPerson extends baseModule implements passwordService {
$filename = 'userCertificate' . getRandomNumber() . '.der';
$pathOut = dirname(__FILE__) . '/../../tmp/' . $filename;
$out = @fopen($pathOut, "wb");
@chmod($pathOut, 0600);
@chmod($pathOut, 0640);
fwrite($out, $this->attributes['userCertificate;binary'][$i]);
fclose ($out);
$path = '../../tmp/' . $filename;

View File

@ -165,7 +165,7 @@ function createModulePDF($accounts, $pdf_structure="default", $returnAsString =
$filename = '../../tmp/' . getRandomNumber() . time() .'.pdf';
// Save PDF
$pdf->Output($filename);
chmod($filename, 0600);
chmod($filename, 0640);
// return PDF file name
return $filename;
}