diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-04-04 11:42:26 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-04 11:42:26 -0500 |
commit | 52eaf6cfbbffdfa6f86f0b0cef544198877b4bde (patch) | |
tree | e8cd7d84c36ecf3e521f1cee4e3d829c249cb724 /lib/private/Log | |
parent | 75657c1a6ee0a55de30f0e089d29c531a907b238 (diff) | |
parent | dbf4a4b844fa1e302b162bfbeea53bea229359f1 (diff) | |
download | nextcloud-server-52eaf6cfbbffdfa6f86f0b0cef544198877b4bde.tar.gz nextcloud-server-52eaf6cfbbffdfa6f86f0b0cef544198877b4bde.zip |
Merge pull request #3310 from duritong/patch-1
only chmod logfile if necessary
Diffstat (limited to 'lib/private/Log')
-rw-r--r-- | lib/private/Log/File.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/Log/File.php b/lib/private/Log/File.php index 4c7ef446a05..8011f63ab13 100644 --- a/lib/private/Log/File.php +++ b/lib/private/Log/File.php @@ -119,7 +119,9 @@ class File { ); $entry = json_encode($entry); $handle = @fopen(self::$logFile, 'a'); - @chmod(self::$logFile, 0640); + if ((fileperms(self::$logFile) & 0777) != 0640) { + @chmod(self::$logFile, 0640); + } if ($handle) { fwrite($handle, $entry."\n"); fclose($handle); |