Bug 998478 - SELinux is preventing /usr/sbin/nginx from read, write access on the file nginx.pid.
Summary: SELinux is preventing /usr/sbin/nginx from read, write access on the file ngi...
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:39bdd3ee4216c1cfcbe8d1d5d2b...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-19 12:10 UTC by 747500
Modified: 2013-08-20 08:55 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-20 08:55:45 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description 747500 2013-08-19 12:10:51 UTC
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.
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                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 08:55:45 UTC
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.