Bug 707307

Summary: SELinux is preventing /usr/sbin/httpd from 'create' accesses on the sock_file cgisock.2044.
Product: [Fedora] Fedora Reporter: Robert Martin <Robert-Martin>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 14CC: dominick.grift, dwalsh, mgrepl, Robert-Martin
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:5b2765a6e83eaee3ca8663e6dd5b3f5d5f67306d24a066cf9b4a73540f71ecb5
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-26 19:56:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Robert Martin 2011-05-24 16:24:10 UTC
SELinux is preventing /usr/sbin/httpd from 'create' accesses on the sock_file cgisock.2044.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that httpd should be allowed create access on the cgisock.2044 sock_file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep httpd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:httpd_t:s0
Target Context                system_u:object_r:httpd_log_t:s0
Target Objects                cgisock.2044 [ sock_file ]
Source                        httpd
Source Path                   /usr/sbin/httpd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           httpd-2.2.17-1.fc14
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.7-40.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.35.13-91.fc14.i686
                              #1 SMP Tue May 3 13:36:36 UTC 2011 i686 i686
Alert Count                   2
First Seen                    Tue 24 May 2011 09:02:09 AM CDT
Last Seen                     Tue 24 May 2011 10:06:45 AM CDT
Local ID                      78decbdd-a136-45ec-8a39-3fd4767902cb

Raw Audit Messages
type=AVC msg=audit(1306249605.106:17): avc:  denied  { create } for  pid=2069 comm="httpd" name="cgisock.2044" scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:httpd_log_t:s0 tclass=sock_file


type=SYSCALL msg=audit(1306249605.106:17): arch=i386 syscall=socketcall success=no exit=EACCES a0=2 a1=bf9310a0 a2=6b9dfc a3=12 items=0 ppid=2044 pid=2069 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=httpd exe=/usr/sbin/httpd subj=system_u:system_r:httpd_t:s0 key=(null)

Hash: httpd,httpd_t,httpd_log_t,sock_file,create

audit2allow

#============= httpd_t ==============
allow httpd_t httpd_log_t:sock_file create;

audit2allow -R

#============= httpd_t ==============
allow httpd_t httpd_log_t:sock_file create;

Comment 1 Dominick Grift 2011-05-24 16:33:24 UTC
What web app or module is trying to create that sock file (cgisock.2044) in /var/log/httpd, do you know?

Can you configure your web app or module and tell it to dump it in /var/lib/httpd or /var/run/httpd instead?

Comment 2 Daniel Walsh 2011-05-24 17:35:59 UTC
*** Bug 707309 has been marked as a duplicate of this bug. ***

Comment 3 Daniel Walsh 2011-05-26 19:56:41 UTC
sockets should be in /var/lib or /var/run