summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2021-01-20 17:15:57 +0100
committerRobin Appelman <robin@icewind.nl>2021-01-20 17:15:57 +0100
commitd182043e83a277a7f95e4d689b1e96d7b1b9a6fb (patch)
treea88f09b4b3f9fe926a4362ac409d74925163aa6d /lib
parent4c81f5c4ad3942cd8f4b8e9e67b956c0181ac435 (diff)
downloadnextcloud-server-d182043e83a277a7f95e4d689b1e96d7b1b9a6fb.tar.gz
nextcloud-server-d182043e83a277a7f95e4d689b1e96d7b1b9a6fb.zip
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>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Storage/Local.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php
index 81d1d083eb8..944b0b69959 100644
--- a/lib/private/Files/Storage/Local.php
+++ b/lib/private/Files/Storage/Local.php
@@ -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) {