aboutsummaryrefslogtreecommitdiffstats
path: root/community/nextcloud/nextcloud10-dont-chmod.patch
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2017-11-14 14:07:15 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2017-11-14 14:08:04 +0000
commit1f7e3605b0eb2c2d673fcd239272663ae0c90d0b (patch)
treeee302c72881a470fb22166f11a9426198a2d4338 /community/nextcloud/nextcloud10-dont-chmod.patch
parentcdb56c9dc7a839c179250dfedf16cd0e9cac10be (diff)
community/nextcloud: add upstream fix for project issue #6028
Remove chmod() from other places
Diffstat (limited to 'community/nextcloud/nextcloud10-dont-chmod.patch')
-rw-r--r--community/nextcloud/nextcloud10-dont-chmod.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/community/nextcloud/nextcloud10-dont-chmod.patch b/community/nextcloud/nextcloud10-dont-chmod.patch
new file mode 100644
index 00000000000..0a3b11975e9
--- /dev/null
+++ b/community/nextcloud/nextcloud10-dont-chmod.patch
@@ -0,0 +1,44 @@
+--- a/lib/private/Config.php
++++ b/lib/private/Config.php
+@@ -229,9 +229,6 @@
+ touch ($this->configFilePath);
+ $filePointer = fopen($this->configFilePath, 'r+');
+
+- // Prevent others not to read the config
+- chmod($this->configFilePath, 0640);
+-
+ // File does not exist, this can happen when doing a fresh install
+ if(!is_resource ($filePointer)) {
+ // TODO fix this via DI once it is very clear that this doesn't cause side effects due to initialization order
+--- a/lib/private/Log/File.php
++++ b/lib/private/Log/File.php
+@@ -130,9 +130,6 @@
+ }
+ $entry = json_encode($entry, JSON_PARTIAL_OUTPUT_ON_ERROR);
+ $handle = @fopen(self::$logFile, 'a');
+- if ((fileperms(self::$logFile) & 0777) != 0640) {
+- @chmod(self::$logFile, 0640);
+- }
+ if ($handle) {
+ fwrite($handle, $entry."\n");
+ fclose($handle);
+--- a/lib/private/TempManager.php
++++ b/lib/private/TempManager.php
+@@ -94,7 +94,6 @@
+ if($postFix !== '') {
+ $fileNameWithPostfix = $this->buildFileNameWithSuffix($file, $postFix);
+ touch($fileNameWithPostfix);
+- chmod($fileNameWithPostfix, 0600);
+ $this->current[] = $fileNameWithPostfix;
+ return $fileNameWithPostfix;
+ }
+--- a/lib/private/legacy/util.php
++++ b/lib/private/legacy/util.php
+@@ -965,7 +965,6 @@
+ . ' cannot be listed by other users.');
+ $perms = substr(decoct(@fileperms($dataDirectory)), -3);
+ if (substr($perms, -1) !== '0') {
+- chmod($dataDirectory, 0770);
+ clearstatcache();
+ $perms = substr(decoct(@fileperms($dataDirectory)), -3);
+ if ($perms[2] !== '0') {