Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1514320 - SELinux is preventing php-fpm from 'map' accesses on the file /etc/nextcloud/config.php.
Summary: SELinux is preventing php-fpm from 'map' accesses on the file /etc/nextcloud/...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 27
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:297e0ae0c12b7f5a2d473dc96f5...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-17 04:17 UTC by Dawid Zamirski
Modified: 2017-11-28 23:53 UTC (History)
7 users (show)

Fixed In Version: selinux-policy-3.13.1-283.17.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-28 23:53:19 UTC


Attachments (Terms of Use)

Description Dawid Zamirski 2017-11-17 04:17:33 UTC
Description of problem:
Setup nextcloud and go to admin settings page.
SELinux is preventing php-fpm from 'map' accesses on the file /etc/nextcloud/config.php.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that php-fpm should be allowed map access on the config.php 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 'php-fpm' --raw | audit2allow -M my-phpfpm
# semodule -X 300 -i my-phpfpm.pp

Additional Information:
Source Context                system_u:system_r:httpd_t:s0
Target Context                system_u:object_r:httpd_sys_rw_content_t:s0
Target Objects                /etc/nextcloud/config.php [ file ]
Source                        php-fpm
Source Path                   php-fpm
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    <Unknown>
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.13.12-300.fc27.x86_64 #1 SMP Wed
                              Nov 8 16:38:01 UTC 2017 x86_64 x86_64
Alert Count                   188
First Seen                    2017-11-16 15:02:24 EST
Last Seen                     2017-11-16 22:15:23 EST
Local ID                      54491c96-f17d-43db-abe4-7ec31b4044f0

Raw Audit Messages
type=AVC msg=audit(1510888523.216:953): avc:  denied  { map } for  pid=15631 comm="php-fpm" path="/etc/nextcloud/config.php" dev="sdd3" ino=410045 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:httpd_sys_rw_content_t:s0 tclass=file permissive=0


Hash: php-fpm,httpd_t,httpd_sys_rw_content_t,file,map


Additional info:
component:      selinux-policy
reporter:       libreport-2.9.3
hashmarkername: setroubleshoot
kernel:         4.13.12-300.fc27.x86_64
type:           libreport

Comment 1 Alex Theotokatos 2017-11-19 09:38:51 UTC
Description of problem:
When I login into my drupal server, with mariadb, I get this selinux error.
Server is only on local machine and the url is at 'localhost/drupal7'

Version-Release number of selected component:
selinux-policy-3.13.1-283.14.fc27.noarch

Additional info:
reporter:       libreport-2.9.3
hashmarkername: setroubleshoot
kernel:         4.13.12-300.fc27.x86_64
type:           libreport

Comment 2 Fedora Update System 2017-11-22 08:54:25 UTC
selinux-policy-3.13.1-283.17.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-d05b1a2ab9

Comment 3 Fedora Update System 2017-11-22 21:40:53 UTC
selinux-policy-3.13.1-283.17.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-d05b1a2ab9

Comment 4 Fedora Update System 2017-11-28 23:53:19 UTC
selinux-policy-3.13.1-283.17.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.


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