Merge pull request #25236 from nextcloud/mkdir-explicit-chmod

explicitly set permissions on newly created folders
This commit is contained in:
Julius Härtl 2021-01-21 07:56:10 +01:00 committed by GitHub
commit 349b65eff3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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) { 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) { public function rmdir($path) {