Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at

Bug 1514865

Summary: selinux preventing php-fpm from starting when apcu is enabled
Product: [Fedora] Fedora Reporter: Scott Shambarger <scott-fedora>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: dwalsh, lvrabec, mgrepl, plautrba, pmoore
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: selinux-policy-3.13.1-283.16.fc27 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-20 16:57:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Scott Shambarger 2017-11-19 01:13:42 UTC
Description of problem:
# ausearch -m avc -i -ts recent | audit2why -
type=AVC msg=audit(11/18/2017 11:55:47.215:208) : avc:  denied  { map } for  pid=1646 comm=php-fpm path=/tmp/apc.xeudaj (deleted) dev="tmpfs" ino=29843 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:httpd_tmp_t:s0 tclass=file permissive=0 

        Was caused by:
        The boolean httpd_tmp_exec was set incorrectly. 
        Allow Apache to execute tmp content.

        Allow access by executing:
        # setsebool -P httpd_tmp_exec 1

systemctl start php-fpm logs the following error:

NOTICE: PHP message: PHP Fatal error:  PHP Startup: apc_mmap: mmap failed: in Unknown on line 0

I'm not very excited about having to enable httpd_tmp_exec for all apache processes just to run php with apcu.

Perhaps php-pecl-apcu needs a different /tmp directory with a label that it can map files in? 

Version-Release number of selected component (if applicable):


Comment 1 Fedora Update System 2017-11-20 09:37:15 UTC
selinux-policy-3.13.1-283.16.fc27 has been submitted as an update to Fedora 27.

Comment 2 Fedora Update System 2017-11-20 16:57:25 UTC
selinux-policy-3.13.1-283.16.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.