Just to give a more complete answer about why this is in the interest of Google users. Your server or shell most likely has an umask set. By default, it looks like the Python logger wants to set the log files to 666 , but first runs this value through the current set umask value, which is probably set to something like 002 so that it removes read and write permissions from any files created.
In bash, you can check your umask by running:
umask
and you can get rid of it by doing:
umask 0
In Python, you can reset it by adding:
import os os.umask(0)
I would make sure that both of them are 0 before trying to create any log files to avoid accidental permission errors.
source share