aboutsummaryrefslogtreecommitdiffstats
path: root/community/nextcloud/nextcloud14-dont-chmod.patch
blob: 13b5e3efbf26db61aabb78964fab978ea275cefd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
--- a/lib/private/Config.php
+++ b/lib/private/Config.php
@@ -240,9 +240,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
@@ -134,9 +134,6 @@
 		}
 		$entry = json_encode($entry, JSON_PARTIAL_OUTPUT_ON_ERROR);
 		$handle = @fopen($this->logFile, 'a');
-		if ((fileperms($this->logFile) & 0777) != 0640) {
-			@chmod($this->logFile, 0640);
-		}
 		if ($handle) {
 			fwrite($handle, $entry."\n");
 			fclose($handle);
--- a/lib/private/TempManager.php
+++ b/lib/private/TempManager.php
@@ -95,7 +95,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
@@ -1008,7 +1008,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') {