-
Notifications
You must be signed in to change notification settings - Fork 466
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
Please do not chown/chmod if the log file is a device like e.g. /dev/null #383
Comments
happened to a collegue of mine too :) |
This is a good idea, although it should probably be based on a filename, Anyway, this is pretty straightforward to implement something like this, Bazsi On Mon, Feb 9, 2015 at 4:37 PM, Fabien Wernli notifications@github.com
|
Hi, On Mon, Feb 16, 2015 at 02:38:05AM -0800, Balazs Scheidler wrote:
Actually that was what I had in mind: Any file name that matches
/~\ Plain Text Ribbon Campaign | Axel Beckert |
I think it could not be checked only if the file (source or destination) is a device because all devices are system entity in filesystem. |
PR: #550 |
Please suppress the chown/chmod on the log file if the destination file is a device like e.g.
/dev/null
, i.e. any path starting with/dev/
.Changing the permissions of
/dev/null
unexpectedly is known to cause the weirdest issues as e.g. shell scripts running under a non-root user will fail upon redirection to/dev/null
, etc.(Yes, I know doing so isn't the best idea, but someone may try it just for an experiment, reverts it soon afterwards, but the damage is done already. And maybe the administrator doesn't even relate the new issues caused by this with his little experiment, because he already reverted that change -- which does't revert the permission changes on
/dev/null
.)For completeness: I experienced this behaviour on Debian 7 Wheezy (current Debian Stable Release) which ships syslog-ng 3.3.5.
The text was updated successfully, but these errors were encountered: