Bug 1000376 - SELinux is preventing /usr/sbin/nginx from 'connectto' accesses on the unix_stream_socket /run/thin/junkets.sn.g02.org.sock.
Summary: SELinux is preventing /usr/sbin/nginx from 'connectto' accesses on the unix_s...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 19
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:d371081bfaf2a3d2a5e802ff2e4...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-23 10:26 UTC by Renich Bon Ciric
Modified: 2013-08-28 17:38 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-28 17:38:16 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Renich Bon Ciric 2013-08-23 10:26:30 UTC
Description of problem:
This problem keeps happening... 
SELinux is preventing /usr/sbin/nginx from 'connectto' accesses on the unix_stream_socket /run/thin/junkets.sn.g02.org.sock.

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

If you believe that nginx should be allowed connectto access on the junkets.sn.g02.org.sock unix_stream_socket 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:system_r:initrc_t:s0
Target Objects                /run/thin/junkets.sn.g02.org.sock [
                              unix_stream_socket ]
Source                        nginx
Source Path                   /usr/sbin/nginx
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           nginx-1.4.2-1.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-71.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.10.7-200.fc19.x86_64 #1 SMP Thu
                              Aug 15 23:19:45 UTC 2013 x86_64 x86_64
Alert Count                   6
First Seen                    2013-08-23 05:25:32 CDT
Last Seen                     2013-08-23 05:25:35 CDT
Local ID                      ac2df279-f737-42a0-8895-ffb945f1df08

Raw Audit Messages
type=AVC msg=audit(1377253535.933:665): avc:  denied  { connectto } for  pid=30009 comm="nginx" path="/run/thin/junkets.sn.g02.org.sock" scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:system_r:initrc_t:s0 tclass=unix_stream_socket


type=SYSCALL msg=audit(1377253535.933:665): arch=x86_64 syscall=connect success=no exit=EACCES a0=6 a1=7fdb83621728 a2=6e a3=7fffde422980 items=0 ppid=1122 pid=30009 auid=4294967295 uid=996 gid=996 euid=996 suid=996 fsuid=996 egid=996 sgid=996 fsgid=996 ses=4294967295 tty=(none) comm=nginx exe=/usr/sbin/nginx subj=system_u:system_r:httpd_t:s0 key=(null)

Hash: nginx,httpd_t,initrc_t,unix_stream_socket,connectto

Additional info:
reporter:       libreport-2.1.6
hashmarkername: setroubleshoot
kernel:         3.10.7-200.fc19.x86_64
type:           libreport

Comment 1 Daniel Walsh 2013-08-26 20:04:02 UTC
Looks like thin is running with the wrong label?

ls -lZ /usr/bin/thin

Comment 2 Renich Bon Ciric 2013-08-26 21:14:39 UTC
# ls -lZ $( which thin )
-rwxr-xr-x. root root unconfined_u:object_r:bin_t:s0   /usr/local/bin/thin

Comment 3 Daniel Walsh 2013-08-28 17:38:16 UTC
restorecon -v /usr/local/bin/thin


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