Bug 1391229 - SELinux is preventing nginx from 'read' accesses on the file css.js.
Summary: SELinux is preventing nginx from 'read' accesses on the file css.js.
Keywords:
Status: CLOSED DUPLICATE of bug 1391228
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 25
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:e3873aa966c763861b0913190e4...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-02 20:05 UTC by Mikhail
Modified: 2016-11-07 20:31 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-07 20:31:01 UTC
Type: ---


Attachments (Terms of Use)

Description Mikhail 2016-11-02 20:05:12 UTC
Description of problem:
SELinux is preventing nginx from 'read' accesses on the file css.js.

*****  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 read access on the css.js 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:
# ausearch -c 'nginx' --raw | audit2allow -M my-nginx
# semodule -X 300 -i my-nginx.pp

Additional Information:
Source Context                system_u:system_r:httpd_t:s0
Target Context                unconfined_u:object_r:user_home_t:s0
Target Objects                css.js [ file ]
Source                        nginx
Source Path                   nginx
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-220.fc25.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.8.5-300.fc25.x86_64+debug #1 SMP
                              Fri Oct 28 21:21:05 UTC 2016 x86_64 x86_64
Alert Count                   4
First Seen                    2016-11-01 22:29:00 +05
Last Seen                     2016-11-03 01:01:23 +05
Local ID                      1952ce71-1963-4f6e-b4cd-5ab6acb3975d

Raw Audit Messages
type=AVC msg=audit(1478116883.385:248): avc:  denied  { read } for  pid=1117 comm="nginx" name="css.js" dev="sdb" ino=6442530244 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=0


Hash: nginx,httpd_t,user_home_t,file,read

Version-Release number of selected component:
selinux-policy-3.13.1-220.fc25.noarch

Additional info:
reporter:       libreport-2.8.0
hashmarkername: setroubleshoot
kernel:         4.8.5-300.fc25.x86_64+debug
type:           libreport

Comment 1 Lukas Vrabec 2016-11-07 20:31:01 UTC

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


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