Bug 1403445

Summary: SELinux is preventing httpd from 'write' accesses on the directory /var/www/html/gocareera/wp-includes.
Product: [Fedora] Fedora Reporter: Dmitrtiy <live>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: dominick.grift, dwalsh, lvrabec, mgrepl, plautrba, pmoore, ssekidde
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:7d83f26cce0b3eee53a7fa2e75a29dc206f3d9438dc4a4fcd1290b067c69b94f;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-10 12:49:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Dmitrtiy 2016-12-10 11:43:54 UTC
Description of problem:
SELinux is preventing httpd from 'write' accesses on the directory /var/www/html/gocareera/wp-includes.

*****  Plugin httpd_write_content (92.2 confidence) suggests   ***************

If you want to allow httpd to have write access on the wp-includes directory
Then необходимо изменить метку на «/var/www/html/gocareera/wp-includes»
Do
# semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/gocareera/wp-includes'
# restorecon -v '/var/www/html/gocareera/wp-includes'

*****  Plugin catchall_boolean (7.83 confidence) suggests   ******************

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

*****  Plugin catchall (1.41 confidence) suggests   **************************

If вы считаете, что httpd следует разрешить доступ write к wp-includes directory по умолчанию.
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:httpd_sys_content_t:s0
Target Objects                /var/www/html/gocareera/wp-includes [ dir ]
Source                        httpd
Source Path                   httpd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-191.21.fc24.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.8.10-200.fc24.x86_64 #1 SMP Mon
                              Nov 21 17:55:46 UTC 2016 x86_64 x86_64
Alert Count                   27
First Seen                    2016-12-06 23:42:40 MSK
Last Seen                     2016-12-09 21:24:12 MSK
Local ID                      f6d5fa35-36cc-4fb3-b5fd-21b91b40bd66

Raw Audit Messages
type=AVC msg=audit(1481307852.837:375): avc:  denied  { write } for  pid=27697 comm="httpd" name="wp-includes" dev="sda8" ino=6040441 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:httpd_sys_content_t:s0 tclass=dir permissive=0


Hash: httpd,httpd_t,httpd_sys_content_t,dir,write

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

Additional info:
reporter:       libreport-2.7.2
hashmarkername: setroubleshoot
kernel:         4.8.10-200.fc24.x86_64
type:           libreport

Potential duplicate: bug 901356

Comment 1 Daniel Walsh 2016-12-10 12:49:41 UTC
Alert tells  you what to do.

Description of problem:
SELinux is preventing httpd from 'write' accesses on the directory /var/www/html/gocareera/wp-includes.

*****  Plugin httpd_write_content (92.2 confidence) suggests   ***************

If you want to allow httpd to have write access on the wp-includes directory
Then необходимо изменить метку на «/var/www/html/gocareera/wp-includes»
Do
# semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/gocareera/wp-includes'
# restorecon -v '/var/www/html/gocareera/wp-includes'