Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
+++ This bug was initially created as a clone of Bug #872345 +++
Description of problem:
Currently if SELinux enabled on Fedora 16+ or RHEL6 and awstats installed (via EPEL for RHEL) - enabling "PurgeLogFile=1" option creates SELinux denials.
Version-Release number of selected component (if applicable):
RHEL:
awstats-7.0-2.el6.noarch
selinux-policy-3.7.19-155.el6_3.4.noarch
selinux-policy-targeted-3.7.19-155.el6_3.4.noarch
F16:
awstats-7.0-6.fc16.noarch
selinux-policy-3.10.0-91.fc16.noarch
selinux-policy-targeted-3.10.0-91.fc16.noarch
How reproducible:
always
Steps to Reproduce:
1. install Fedora/RHEL+EPEL
2. enable SELinux
3. install awstats
4. configure awstats to purge httpd log files:
PurgeLogFile=1
Actual results:
type=AVC msg=audit(1349467262.084:790): avc: denied { write } for pid=7413 comm="awstats.pl" name="moodle22-access_log" dev=dm-6 ino=39 scontext=system_u:system_r:awstats_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:httpd_log_t:s0 tclass=file
and un-purged files.
Expected results:
files processed by awstats and logfiles purged after processing.
Additional info:
I have "fixed" it locally by building additional SELinux policy module:
module awstats-httpd-logs 1.1;
require {
type httpd_log_t;
type awstats_t;
class file write;
}
#============= awstats_t ==============
allow awstats_t httpd_log_t:file write;
however I believe it should be part of base awstats module with a tunable boolean switching on/off behavior with default to "off".
Comment 2RHEL Program Management
2012-12-14 08:17:13 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
http://rhn.redhat.com/errata/RHBA-2013-1598.html