Bug 1011673 - SELinux is preventing /usr/sbin/nginx from 'open' accesses on the file /home/mikhail/logs/nginx_error.log.
Summary: SELinux is preventing /usr/sbin/nginx from 'open' accesses on the file /home/...
Keywords:
Status: CLOSED DUPLICATE of bug 1011672
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 20
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:a88424c5a37e6fd7e22457a6f69...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-24 19:16 UTC by Mikhail
Modified: 2013-09-24 19:36 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-24 19:36:41 UTC
Type: ---


Attachments (Terms of Use)

Description Mikhail 2013-09-24 19:16:39 UTC
Description of problem:
SELinux is preventing /usr/sbin/nginx from 'open' accesses on the file /home/mikhail/logs/nginx_error.log.

*****  Plugin catchall_boolean (89.3 confidence) suggests   ******************

If you want to allow httpd to read user content
Then you must tell SELinux about this by enabling the 'httpd_read_user_content' boolean.
You can read 'None' man page for more details.
Do
setsebool -P httpd_read_user_content 1

*****  Plugin catchall (11.6 confidence) suggests   **************************

If you believe that nginx should be allowed open access on the nginx_error.log 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                system_u:object_r:user_home_t:s0
Target Objects                /home/mikhail/logs/nginx_error.log [ file ]
Source                        nginx
Source Path                   /usr/sbin/nginx
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           nginx-1.4.2-3.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-75.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.11.1-300.fc20.x86_64 #1 SMP Sat
                              Sep 14 15:01:23 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-09-25 01:16:09 YEKT
Last Seen                     2013-09-25 01:16:09 YEKT
Local ID                      cee0246e-4d08-48cf-a2ec-67864e7a8c43

Raw Audit Messages
type=AVC msg=audit(1380050169.307:498): avc:  denied  { open } for  pid=6954 comm="nginx" path="/home/mikhail/logs/nginx_error.log" dev="sdb" ino=167773486 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:user_home_t:s0 tclass=file


type=SYSCALL msg=audit(1380050169.307:498): arch=x86_64 syscall=open success=no exit=EACCES a0=7fb1d1b6fde3 a1=441 a2=1a4 a3=0 items=0 ppid=1 pid=6954 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,user_home_t,file,open

Additional info:
reporter:       libreport-2.1.7
hashmarkername: setroubleshoot
kernel:         3.11.1-300.fc20.x86_64
type:           libreport

Potential duplicate: bug 964379

Comment 1 Daniel Walsh 2013-09-24 19:36:41 UTC

*** This bug has been marked as a duplicate of bug 1011672 ***


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