Bug 1055345

Summary: SELinux is preventing /usr/sbin/nginx from 'setattr' accesses on the directory tmp.
Product: [Fedora] Fedora Reporter: Mikhail <mikhail.v.gavrilov>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: dominick.grift, dwalsh, lvrabec, mgrepl, mikhail.v.gavrilov
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Unspecified   
Whiteboard: abrt_hash:e35c8578c0abd9e256cf03c4f8c31ebdfeff7478b4880b7aeb5f21e02c1511ab
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-11-24 11:08:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mikhail 2014-01-20 04:44:58 UTC
Description of problem:
SELinux is preventing /usr/sbin/nginx from 'setattr' accesses on the directory tmp.

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

If you believe that nginx should be allowed setattr access on the tmp directory 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:tmp_t:s0
Target Objects                tmp [ dir ]
Source                        nginx
Source Path                   /usr/sbin/nginx
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           nginx-1.4.4-1.fc20.i686
Target RPM Packages           filesystem-3.2-19.fc20.i686
Policy RPM                    selinux-policy-3.12.1-106.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.12.7-300.fc20.i686+PAE #1 SMP
                              Fri Jan 10 16:10:11 UTC 2014 i686 i686
Alert Count                   1
First Seen                    2014-01-14 16:27:08 YEKT
Last Seen                     2014-01-14 16:27:08 YEKT
Local ID                      28d6b1a2-7c9f-4048-968b-7c7b7c236b3e

Raw Audit Messages
type=AVC msg=audit(1389695228.942:1286): avc:  denied  { setattr } for  pid=9068 comm="nginx" name="tmp" dev="sda1" ino=273744 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=dir


type=SYSCALL msg=audit(1389695228.942:1286): arch=i386 syscall=chown32 success=yes exit=0 a0=b870590e a1=3de a2=ffffffff a3=0 items=0 ppid=1 pid=9068 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,tmp_t,dir,setattr

Additional info:
reporter:       libreport-2.1.11
hashmarkername: setroubleshoot
kernel:         3.12.8-300.fc20.i686+PAE
type:           libreport

Comment 1 Miroslav Grepl 2014-01-20 08:15:51 UTC
Have you ever run nginx directly?