Skip to content

Commit 349b65e

Browse files
authored
Merge pull request #25236 from nextcloud/mkdir-explicit-chmod
explicitly set permissions on newly created folders
2 parents 054783e + d182043 commit 349b65e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/private/Files/Storage/Local.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ public function getId() {
8686
}
8787

8888
public function mkdir($path) {
89-
return @mkdir($this->getSourcePath($path), 0777, true);
89+
$sourcePath = $this->getSourcePath($path);
90+
$result = @mkdir($sourcePath, 0777, true);
91+
chmod($sourcePath, 0755);
92+
return $result;
9093
}
9194

9295
public function rmdir($path) {

0 commit comments

Comments
 (0)