Bug 1034308 - SELinux is preventing /usr/sbin/nginx from 'write' accesses on the sock_file localhost.sock.
Summary: SELinux is preventing /usr/sbin/nginx from 'write' accesses on the sock_file ...
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 20
Hardware: i686
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:a8df0e27b767ebd5c895ccac614...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-25 14:54 UTC by Mikhail
Modified: 2015-01-12 12:09 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-25 13:50:48 UTC
Type: ---


Attachments (Terms of Use)

Description Mikhail 2013-11-25 14:54:35 UTC
Description of problem:
SELinux is preventing /usr/sbin/nginx from 'write' accesses on the sock_file localhost.sock.

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

If you believe that nginx should be allowed write access on the localhost.sock 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 nginx /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:var_run_t:s0
Target Objects                localhost.sock [ sock_file ]
Source                        nginx
Source Path                   /usr/sbin/nginx
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           nginx-1.4.4-1.fc20.i686
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-90.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.12.0-2.fc21.i686+PAE #1 SMP Sat
                              Nov 9 21:31:51 UTC 2013 i686 i686
Alert Count                   3
First Seen                    2013-11-25 20:45:50 YEKT
Last Seen                     2013-11-25 20:46:10 YEKT
Local ID                      9d833939-7232-46a7-804e-d310a4f675f1

Raw Audit Messages
type=AVC msg=audit(1385390770.510:801): avc:  denied  { write } for  pid=13403 comm="nginx" name="localhost.sock" dev="tmpfs" ino=3598155 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=sock_file


type=SYSCALL msg=audit(1385390770.510:801): arch=i386 syscall=socketcall success=no exit=EACCES a0=3 a1=bfaefa70 a2=b77ca714 a3=b93ba5b0 items=0 ppid=13402 pid=13403 auid=4294967295 uid=989 gid=986 euid=989 suid=989 fsuid=989 egid=986 sgid=986 fsgid=986 ses=4294967295 tty=(none) comm=nginx exe=/usr/sbin/nginx subj=system_u:system_r:httpd_t:s0 key=(null)

Hash: nginx,httpd_t,var_run_t,sock_file,write

Additional info:
reporter:       libreport-2.1.9
hashmarkername: setroubleshoot
kernel:         3.12.0-2.fc21.i686+PAE
type:           libreport

Potential duplicate: bug 967764

Comment 1 Miroslav Grepl 2014-01-13 15:13:43 UTC
What does

# ps -efZ |grep init_t


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