-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
accesslog set to /dev/null broken in 19.4 #1157
Comments
but what are the permissions of /dev/null ? Normally anyone should have access to it... [~] ls -fla /dev/null 11:49:21
crw-rw-rw- 1 root 3, 2 Dec 4 11:49 /dev/null |
Writing is fine, it's trying to chown it while running as a non-root user that's the issue. |
oh right. Actually I am thinking we should check if the user has enough permission to write on an existing file. I will make such changes tomorrow. |
Okay, there are actually two issues described here:
While the title describes the first of these, I think that's not actually an issue. I believe should fail to start if it cannot open the access log. If we fix the second issue, then there is no need to pass /dev/null to enable the access logging in syslog. I have placed this fix on a branch for review: https://github.com/benoitc/gunicorn/compare/1157-access-syslog?expand=1 |
@tilgovi just commented your fix. Let's merge it, then check if we still need some action there. |
Done in 2f8e750 |
Thank you @tilgovi and @benoitc, this does indeed fix the "the --access-logfile option is needed to get access logs into syslog" issue. I'm still somewhat of an opinion that setting a log file to |
Why do I have accesslog file set to
/dev/null
? This seems to be the only sane way to get gunicorn to not print access log to stdout/stderr yet still send it to syslog (with accesslog file not set at all accesslog doesn't go to syslog, tested on 19.3 and 19.4).This used to work in 19.3, d922df3 changed it.
Please let me know if it's expected for
/dev/null
to not work as accesslog file.Edit:
The actual error:
Edit 2: this is running as non-root user
The text was updated successfully, but these errors were encountered: