1
0
mirror of https://github.com/r4sas/py-i2phosts synced 2025-02-09 13:24:22 +00:00

py-i2phosts-master: relax daemon umask to 022

I don't remember why it was set to 077 initially, but now I see it
causes problems. Exactly, py-i2phosts-builer called from master creates
hosts.txt file with 600 permissions, so file is not readable by nginx
for example. New umask fixes this problem.
This commit is contained in:
Hidden Z 2015-11-15 19:34:02 +00:00
parent 0398b98df6
commit d975295892

View File

@ -149,7 +149,7 @@ if not args.debug and not args.verbose:
# get pid object for daemon
pid = pidfile.TimeoutPIDLockFile(config['pid_file'], 10)
# create daemon context
d = daemon.DaemonContext(pidfile=pid, umask=077)
d = daemon.DaemonContext(pidfile=pid, umask=022)
# write stderr to logfile # FIXME: and how we will deal with log rotation?
logfile = open(config['log_file'], 'a')
d.stderr = logfile