Bug 1000376 - SELinux is preventing /usr/sbin/nginx from 'connectto' accesses on the unix_stream_socket /run/thin/junkets.sn.g02.org.sock.
SELinux is preventing /usr/sbin/nginx from 'connectto' accesses on the unix_s...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
19
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
abrt_hash:d371081bfaf2a3d2a5e802ff2e4...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-23 06:26 EDT by Renich Bon Ciric
Modified: 2013-08-28 13:38 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-28 13:38:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Renich Bon Ciric 2013-08-23 06:26:30 EDT
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 16:04:02 EDT
Looks like thin is running with the wrong label?

ls -lZ /usr/bin/thin
Comment 2 Renich Bon Ciric 2013-08-26 17:14:39 EDT
# 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 13:38:16 EDT
restorecon -v /usr/local/bin/thin

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