uchiwa icon indicating copy to clipboard operation
uchiwa copied to clipboard

Uchiwa RPM logrotate config ownership/mode are wrong

Open bodgit opened this issue 5 years ago • 1 comments

Expected Behavior

Logrotate should be rotating Uchiwa log files. This was reported and fixed in #765 however the fix has been lost.

Current Behavior

Logrotate currently ignores the Uchiwa config drop-in as it has the wrong mode owner and mode.

Possible Solution

RPM needs to set the logrotate config file as owner by root:root and mode 0644. Currently they are set as follows:

$  rpm -qlv uchiwa | grep logrotate
-rw-rw-r--    1 uchiwa  uchiwa                    144 Feb 27 21:46 /etc/logrotate.d/uchiwa

Steps to Reproduce (for bugs)

  1. logrotate -d /etc/logrotate.conf produces error: Ignoring uchiwa because of bad file mode - must be 0644 or 0444.
  2. Fix file mode to be 0644
  3. logrotate -d /etc/logrotate.conf now produces Ignoring uchiwa because the file owner is wrong (should be root).
  4. Change ownership to root:root
  5. logrotate -d /etc/logrotate.conf no longer ignores uchiwa config

Your Environment

  • Uchiwa version used: 1.6.0
  • Operating System and version (e.g. Ubuntu 14.04): EL7

bodgit avatar Mar 18 '19 10:03 bodgit

Investigate to ensure this is being done correctly and address if it is not.

annaplotkin avatar Mar 18 '19 18:03 annaplotkin