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.
Bug 966311 - SELinux prevents mod_wsgi from creating socket in /var/log/httpd directory
Summary: SELinux prevents mod_wsgi from creating socket in /var/log/httpd directory
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: mod_wsgi
Version: 6.4
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Luboš Uhliarik
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
: 974995 1121019 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-23 02:55 UTC by Rob Lowe
Modified: 2021-01-14 09:34 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-28 09:51:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 577754 0 low CLOSED SELinux is preventing /usr/sbin/httpd from using potentially mislabeled files wsgi.6317.0.1.sock. 2021-02-22 00:41:40 UTC

Description Rob Lowe 2013-05-23 02:55:35 UTC
Description of problem:

By default, mod_wsgi wants to create a socket in /var/log/httpd, that's blocked by the default SELinux policy:

type=AVC msg=audit(1369272671.350:181): avc:  denied  { create } for  pid=18620 comm="httpd" name="wsgi.18620.0.1.sock" scontext=unconfined_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:httpd_log_t:s0 tclass=sock_file


I think /var/run would be a more sensible place to create this socket. I've corrected this issue by adding the following line to /etc/httpd/conf.d/wsgi.conf:

WSGISocketPrefix /var/run/wsgi

Would it be possible to make this the default, please?


Version-Release number of selected component (if applicable):

Red Hat Enterprise Linux Server release 6.4 (Santiago)
httpd-2.2.15-28.el6_4.x86_64
mod_wsgi-3.2-3.el6.x86_64



Similar bugs are: 495780 and 577754

Comment 4 Joe Orton 2013-06-17 10:41:49 UTC
*** Bug 974995 has been marked as a duplicate of this bug. ***

Comment 5 Joe Orton 2014-10-21 10:54:42 UTC
*** Bug 1121019 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.