mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
make sure the users can access to the logs
make sure that a user is able to access to the logs after dropping a privilege. fix #1116
This commit is contained in:
parent
821123d48f
commit
d922df3902
@ -336,6 +336,8 @@ class Logger(object):
|
||||
else:
|
||||
util.check_is_writeable(output)
|
||||
h = logging.FileHandler(output)
|
||||
# make sure the user can reopen the file
|
||||
os.chown(h.baseFilename, self.cfg.user, self.cfg.group)
|
||||
|
||||
h.setFormatter(fmt)
|
||||
h._gunicorn = True
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user