summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Log/File.php4
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);