Bug 1377061 - SELinux is preventing httpd from 'read' accesses on the file styles.css.
Summary: SELinux is preventing httpd from 'read' accesses on the file styles.css.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 24
Hardware: x86_64
OS: Unspecified
low
low
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:2d515fe09dcacbdff8bc8b7e625...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-18 06:44 UTC by Dmitrtiy
Modified: 2016-09-19 08:26 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-19 08:26:20 UTC
Type: ---


Attachments (Terms of Use)

Description Dmitrtiy 2016-09-18 06:44:06 UTC
Description of problem:
SELinux is preventing httpd from 'read' accesses on the file styles.css.

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

If вы хотите выполнить следующее: allow httpd to read user content
Then вы должны сообщить SELinux об этом, включив переключатель «httpd_read_user_content».
Дополнительная документация на 'None' ман странице.
Do
setsebool -P httpd_read_user_content 1

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

If вы считаете, что httpd следует разрешить доступ read к styles.css file по умолчанию.
Then рекомендуется создать отчет об ошибке.
Чтобы разрешить доступ, можно создать локальный модуль политики.
Do
allow this access for now by executing:
# ausearch -c 'httpd' --raw | audit2allow -M my-httpd
# semodule -X 300 -i my-httpd.pp

Additional Information:
Source Context                system_u:system_r:httpd_t:s0
Target Context                unconfined_u:object_r:user_home_t:s0
Target Objects                styles.css [ file ]
Source                        httpd
Source Path                   httpd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-191.14.fc24.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.5.5-300.fc24.x86_64 #1 SMP Thu
                              May 19 13:05:32 UTC 2016 x86_64 x86_64
Alert Count                   23
First Seen                    2016-09-16 22:20:30 MSK
Last Seen                     2016-09-16 22:27:31 MSK
Local ID                      3d2f54ab-075f-41c0-a621-4dab2c5349ff

Raw Audit Messages
type=AVC msg=audit(1474054051.786:455): avc:  denied  { read } for  pid=1775 comm="httpd" name="styles.css" dev="sda7" ino=1312418 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=0


Hash: httpd,httpd_t,user_home_t,file,read

Version-Release number of selected component:
selinux-policy-3.13.1-191.14.fc24.noarch

Additional info:
reporter:       libreport-2.7.2
hashmarkername: setroubleshoot
kernel:         4.5.5-300.fc24.x86_64
type:           libreport

Potential duplicate: bug 675308

Comment 1 Lukas Vrabec 2016-09-19 08:26:20 UTC
Hi, 
You need to fix file contexts on your system.

# restorecon -Rv PATH_TO_WEBSITE_FILES.


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