Bug 1055345 - SELinux is preventing /usr/sbin/nginx from 'setattr' accesses on the directory tmp.
Summary: SELinux is preventing /usr/sbin/nginx from 'setattr' accesses on the director...
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 20
Hardware: i686
OS: Unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
Whiteboard: abrt_hash:e35c8578c0abd9e256cf03c4f8c...
Depends On:
TreeView+ depends on / blocked
Reported: 2014-01-20 04:44 UTC by Mikhail
Modified: 2015-01-19 12:40 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-11-24 11:08:23 UTC
Type: ---

Attachments (Terms of Use)

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.
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?

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