Skip to content
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

logrotate.d ignores kapacitor configuration due to bad file mode #1043

Closed
winem opened this issue Nov 16, 2016 · 1 comment
Closed

logrotate.d ignores kapacitor configuration due to bad file mode #1043

winem opened this issue Nov 16, 2016 · 1 comment

Comments

@winem
Copy link

winem commented Nov 16, 2016

By default, kapacitor creates the logrotate configuration in /etc/logrotate.d with 664 as permission.

logrotate has the following requirements:

  • configuration file owner must be root
  • configuration file mode must be 664

Otherwise, you'll get this error when running logrotate -f /etc/logrotate.conf
root@host-1:/etc/logrotate.d# logrotate -v -f /etc/logrotate.conf
reading config file /etc/logrotate.conf
including /etc/logrotate.d
reading config file apport
reading config file apt
Ignoring couchdb because the file owner is wrong (should be root).
reading config file dpkg
reading config file influxdb
Ignoring kapacitor because of bad file mode.
reading config file rsyslog
reading config file telegraf
reading config file ufw
reading config file unattended-upgrades

Successfully reproduced the issue on Debian 8, CentOS 7 and Ubuntu 16.04.

Already have a fix for that and forked the repository. Will create the pull request soon.

winem pushed a commit to winem/kapacitor that referenced this issue Nov 16, 2016
winem pushed a commit to winem/kapacitor that referenced this issue Nov 21, 2016
nathanielc added a commit that referenced this issue Nov 21, 2016
issue #1043 wrong file mode on kapacitor logrotate configuration
@rossmcdonald
Copy link
Contributor

Fixed with #1044. To anyone who encounters this, run:

sudo chmod 644 /etc/logrotate.d/kapacitor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants