explicitly set permissions on newly created folders

this works around any `umask` that might be set and limiting the folder permissions

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2021-01-20 17:15:57 +01:00
parent 4c81f5c4ad
commit d182043e83
No known key found for this signature in database
GPG Key ID: 42B69D8A64526EFB
1 changed files with 4 additions and 1 deletions

View File

@ -86,7 +86,10 @@ class Local extends \OC\Files\Storage\Common {
}
public function mkdir($path) {
return @mkdir($this->getSourcePath($path), 0777, true);
$sourcePath = $this->getSourcePath($path);
$result = @mkdir($sourcePath, 0777, true);
chmod($sourcePath, 0755);
return $result;
}
public function rmdir($path) {