Bug 998478 - SELinux is preventing /usr/sbin/nginx from read, write access on the file nginx.pid.
SELinux is preventing /usr/sbin/nginx from read, write access on the file ngi...
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-08-19 08:10 EDT by 747500
Modified: 2013-08-20 04:55 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-08-20 04:55:45 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description 747500 2013-08-19 08:10:51 EDT
Description of problem:
SELinux is preventing /usr/sbin/nginx from read, write access on the file nginx.pid.

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

If you believe that nginx should be allowed read write access on the nginx.pid file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
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                unconfined_u:object_r:var_run_t:s0
Target Objects                nginx.pid [ file ]
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-69.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.9.5-301.fc19.x86_64 #1 SMP Tue
                              Jun 11 19:39:38 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-08-16 18:38:31 MSK
Last Seen                     2013-08-16 18:38:31 MSK
Local ID                      a85d3169-0bdc-49b8-9b21-28dbcf8010f9

Raw Audit Messages
type=AVC msg=audit(1376663911.645:526): avc:  denied  { read write } for  pid=4815 comm="nginx" name="nginx.pid" dev="tmpfs" ino=249179 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:var_run_t:s0 tclass=file

type=AVC msg=audit(1376663911.645:526): avc:  denied  { open } for  pid=4815 comm="nginx" path="/run/nginx.pid" dev="tmpfs" ino=249179 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:var_run_t:s0 tclass=file

type=SYSCALL msg=audit(1376663911.645:526): arch=x86_64 syscall=open success=yes exit=EINTR a0=7fe781999b74 a1=42 a2=1a4 a3=0 items=0 ppid=1 pid=4815 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 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,file,read,write

Additional info:
reporter:       libreport-2.1.6
hashmarkername: setroubleshoot
kernel:         3.9.5-301.fc19.x86_64
type:           libreport
Comment 1 Miroslav Grepl 2013-08-20 04:55:45 EDT
Please execute

# restorecon -R -v /var/run/nginx*

to fix this problem.

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