diff --git a/src/calibre/srv/utils.py b/src/calibre/srv/utils.py index 83e1577692..18ea704393 100644 --- a/src/calibre/srv/utils.py +++ b/src/calibre/srv/utils.py @@ -285,7 +285,7 @@ class RotatingStream: self.stream = share_open(self.filename, 'a', newline='') else: # see https://bugs.python.org/issue27805 - self.stream = open(os.open(self.filename, os.O_WRONLY|os.O_APPEND|os.O_CREAT|os.O_CLOEXEC), 'w') + self.stream = open(os.open(self.filename, os.O_WRONLY|os.O_APPEND|os.O_CREAT|os.O_CLOEXEC, mode=0o666), 'w') try: self.stream.tell() except OSError: