Bug 1142677
Summary: | Candlepin logrotate reports insecure permissions | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Sebastian Ickler <sebastian.ickler> |
Component: | Candlepin | Assignee: | Barnaby Court <bcourt> |
Status: | CLOSED DUPLICATE | QA Contact: | Katello QA List <katello-qa-list> |
Severity: | low | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.0.4 | CC: | akaiser, alikins, bcourt, bkearney, brsmith, chrobert, cwelton, dcleal, egolov, erinn.looneytriggs, knovakov, mmccune, mstead, psuriset, sebastian.ickler, tcarlin |
Target Milestone: | Unspecified | Keywords: | Reopened, Triaged |
Target Release: | Unused | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | candlepin-0.9.54.6-1 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-06-07 20:42:06 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 1310173 | ||
Bug Blocks: |
Description
Sebastian Ickler
2014-09-17 08:00:41 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been set to ? to ensure that it is properly evaluated for this release. (In reply to Sebastian Ickler from comment #0) > /etc/cron.daily/logrotate: > > error: skipping "/var/log/candlepin/audit.log" because parent directory has > error: skipping "/var/log/tomcat/catalina.out" because parent directory has On systems showing this, what are the perms of /var/log/candlepin and /var/log/tomcat ? ie, output of: stat /var/log/tomcat/ /var/log/candlepin/ I think this may be related to an upstream logrotate change: https://fedorahosted.org/logrotate/changeset?reponame=&new=449%40trunk&old=448%40trunk > Return an error code when parent directory of log does not exists > "su" directive is not used, logrotate is running as root and missingok is not > > specified. [vcizek] Also, what logrotate version? Here's the stat: [root@host ~]# stat /var/log/tomcat/ /var/log/candlepin/ File: ‘/var/log/tomcat/’ Size: 4096 Blocks: 8 IO Block: 4096 directory Device: fd05h/64773d Inode: 34676917 Links: 2 Access: (0775/drwxrwxr-x) Uid: ( 0/ root) Gid: ( 91/ tomcat) Access: 2014-08-04 21:07:07.000000000 +0200 Modify: 2014-09-24 13:03:18.065207849 +0200 Change: 2014-09-24 13:03:18.065207849 +0200 Birth: - File: ‘/var/log/candlepin/’ Size: 90 Blocks: 0 IO Block: 4096 directory Device: fd05h/64773d Inode: 34634985 Links: 2 Access: (0775/drwxrwxr-x) Uid: ( 91/ tomcat) Gid: ( 91/ tomcat) Access: 2014-08-07 20:35:01.000000000 +0200 Modify: 2014-09-24 13:03:25.705139371 +0200 Change: 2014-09-24 13:03:25.705139371 +0200 Birth: - [root@host ~]# logrotate -v logrotate 3.8.6 - Copyright (C) 1995-2001 Red Hat, Inc. This may be freely redistributed under the terms of the GNU Public License Whoops, I'm a bit trigger-happy today... :) [root@host ~]# rpm -qa |grep logrotate logrotate-3.8.6-4.el7.x86_64 Looks like this was fixed as per Comment 9 *** Bug 1190943 has been marked as a duplicate of this bug. *** hi please provide verification steps thanks 1. Install candlepin 0.9.32-1 or older on a RHEL 7 Server. (candlepin-0.9.23-1.el7.noarch.rpm is in Satellite-6.0.4 mentioned in bug) 2. Verify /var/log/candlepin is owned tomcat.tomcat. 3. Install logrotate-3.8.6-4.el7.x86_64 4. sudo logrotate -v -f /etc/logrotate/candlepin (See errors in description) 1. Install updates 2. sudo logrotate -v -f /etc/logrotate/candlepin (See successful logrotate) VERIFIED: Install Satellite 6.0.4 from the iso steps 1. Install candlepin 0.9.32-1 or older on a RHEL 7 Server. (candlepin-0.9.23-1.el7.noarch.rpm is in Satellite-6.0.4 mentioned in bug) 2. Verify /var/log/candlepin is owned tomcat.tomcat. 3. Install logrotate-3.8.6-4.el7.x86_64 4. sudo logrotate -v -f /etc/logrotate/candlepin (See errors in description) 1. Install updates 2. sudo logrotate -v -f /etc/logrotate/candlepin successful logrotate This bug is slated to be released with Satellite 6.1. This bug was fixed in version 6.1.1 of Satellite which was released on 12 August, 2015. This is reproducible on latest release too. 6.1.4 on RHEL 7.1 Seems like regression. candlepin version candlepin-0.9.49.9-1.el7.noarch logrotate version logrotate-3.8.6-4.el7.x86_64 logrotate -v -f /etc/logrotate.d/candlepin ---%<--- error: skipping "/var/log/candlepin/audit.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation. considering log /var/log/candlepin/candlepin.log error: skipping "/var/log/candlepin/candlepin.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation. considering log /var/log/candlepin/cpdb.log error: skipping "/var/log/candlepin/cpdb.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation. considering log /var/log/candlepin/cpinit.log error: skipping "/var/log/candlepin/cpinit.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation. considering log /var/log/candlepin/error.log error: skipping "/var/log/candlepin/error.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation. set default create context ---%<--- stat /var/log/tomcat/ /var/log/candlepin/ File: ‘/var/log/tomcat/’ Size: 4096 Blocks: 8 IO Block: 4096 directory Device: fd01h/64769d Inode: 3222189579 Links: 2 Access: (0775/drwxrwxr-x) Uid: ( 0/ root) Gid: ( 91/ tomcat) Context: system_u:object_r:tomcat_log_t:s0 Access: 2015-03-24 19:50:20.000000000 -0400 Modify: 2015-11-17 02:29:38.120996953 -0500 Change: 2015-11-17 02:36:04.204524070 -0500 Birth: - File: ‘/var/log/candlepin/’ Size: 90 Blocks: 0 IO Block: 4096 directory Device: fd01h/64769d Inode: 3222083551 Links: 2 Access: (0775/drwxrwxr-x) Uid: ( 91/ tomcat) Gid: ( 91/ tomcat) Context: system_u:object_r:var_log_t:s0 Access: 2015-11-21 03:35:01.259569143 -0500 Modify: 2015-11-17 02:39:11.311152755 -0500 Change: 2015-11-17 02:39:11.311152755 -0500 Birth: - This requires candlepin 0.9.54.6 or later. Moving to POST, please pull in 0.9.54.6. Closing this as it is effectively a dupe of https://bugzilla.redhat.com/show_bug.cgi?id=1212955 *** This bug has been marked as a duplicate of bug 1212955 *** |