Bug 966311 - SELinux prevents mod_wsgi from creating socket in /var/log/httpd directory
SELinux prevents mod_wsgi from creating socket in /var/log/httpd directory
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: mod_wsgi (Show other bugs)
6.4
x86_64 Linux
unspecified Severity medium
: rc
: ---
Assigned To: Web Stack Team
BaseOS QE - Apps
: FastFix, Triaged
: 974995 1121019 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-22 22:55 EDT by Rob Lowe
Modified: 2016-07-28 05:51 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-28 05:51:25 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Bugzilla 577754 None CLOSED SELinux is preventing /usr/sbin/httpd from using potentially mislabeled files wsgi.6317.0.1.sock. 2018-04-05 05:28 EDT

  None (edit)
Description Rob Lowe 2013-05-22 22:55:35 EDT
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 06:41:49 EDT
*** Bug 974995 has been marked as a duplicate of this bug. ***
Comment 5 Joe Orton 2014-10-21 06:54:42 EDT
*** 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.