Browse Source

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.
pull/1/head
Hidden Z 9 years ago
parent
commit
d975295892
  1. 2
      bin/py-i2phosts-master

2
bin/py-i2phosts-master

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

Loading…
Cancel
Save