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.
DescriptionRobert Vogelgesang
2011-12-06 13:20:15 UTC
+++ This bug was initially created as a clone of Bug #723258 +++
The errata package mentioned in bug #723258 adds the workaround which I originally proposed, but did not fully resolve the issue, because the rule
/var/www(/.*)?/logs(/.*)? system_u:object_r:httpd_log_t:s0
was not removed from /etc/selinux/targeted/contexts/files, the solution I proposed in comment 5 of bug #723258. Comment 6 replies only to the possibility to have a boolean for this, but does not say anything about the
reason why this rule even exists.
Description of the remaining problem:
The current SELinux "targeted" policy blocks web access to files in directories named "logs" in hierarchies below /var/www/ other than /var/www/html/. This is caused by the following entry in /etc/selinux/targeted/contexts/files/file_contexts:
/var/www(/.*)?/logs(/.*)? system_u:object_r:httpd_log_t:s0
We frequently mount additional disk space for web servers on various directories below of /var/www/,
The above rule blocks access to parts of the additional web space, without any good reason, because the default setup has the Apache log files in /var/log/httpd/, which does not match this rule.
Version-Release number of selected component (if applicable):
selinux-policy-targeted-3.7.19-126.el6.noarch
How reproducible:
Always
Steps to Reproduce:
1. Install Apache httpd and selinux-policy-targeted on RHEL-6.
2. Create directory /var/www/vweb1 and configure Apache with a VirtualHost
which has /var/www/vweb1 as its DocumentRoot.
3. Create directory /var/www/vweb1/logs/ and some files in it.
4. Try to access the files with a web browser.
Actual results:
The access fails.
Expected results:
The files should be processed like any other content in /var/www/vweb1/.
Additional info:
Comment 2Robert Vogelgesang
2011-12-06 14:06:57 UTC
One minor correction:
The RHEL-6.2 package is selinux-policy-targeted-3.7.19-126.el6_2.3.noarch, but still contains the rule that I'd like to get removed.
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-2012-0780.html