Bug 1568692 - SELinux is preventing (php-fpm) from mounton access on the directory /run/systemd/unit-root/run/php-fpm
Summary: SELinux is preventing (php-fpm) from mounton access on the directory /run/sys...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 28
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-18 06:48 UTC by Juan Orti Alcaine
Modified: 2018-04-18 16:08 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-18 15:55:22 UTC
Type: Bug


Attachments (Terms of Use)

Description Juan Orti Alcaine 2018-04-18 06:48:03 UTC
SELinux is preventing (php-fpm) from mounton access on the directory /run/systemd/unit-root/run/php-fpm.

*****  Plugin restorecon (99.5 confidence) suggests   ************************

If you want to fix the label. 
/run/systemd/unit-root/run/php-fpm default label should be init_var_run_t.
Then you can run restorecon. The access attempt may have been stopped due to insufficient permissions to access a parent directory in which case try to change the following command accordingly.
Do
# /sbin/restorecon -v /run/systemd/unit-root/run/php-fpm

*****  Plugin catchall (1.49 confidence) suggests   **************************

If you believe that (php-fpm) should be allowed mounton access on the php-fpm directory 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:init_t:s0
Target Context                system_u:object_r:httpd_var_run_t:s0
Target Objects                /run/systemd/unit-root/run/php-fpm [ dir ]
Source                        (php-fpm)
Source Path                   (php-fpm)
Port                          <Unknown>
Host                          helio
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.1-21.fc28.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     helio
Platform                      Linux helio 4.16.2-300.fc28.x86_64 #1 SMP Thu Apr
                              12 14:58:07 UTC 2018 x86_64 x86_64
Alert Count                   8
First Seen                    2018-04-17 16:08:16 CEST
Last Seen                     2018-04-18 08:29:27 CEST
Local ID                      ffc6b90b-758e-4a7a-b80b-7bc863fdcded

Raw Audit Messages
type=AVC msg=audit(1524032967.915:114): avc:  denied  { mounton } for  pid=881 comm="(php-fpm)" path="/run/systemd/unit-root/run/php-fpm" dev="tmpfs" ino=28794 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:httpd_var_run_t:s0 tclass=dir permissive=0


Hash: (php-fpm),init_t,httpd_var_run_t,dir,mounton

Comment 1 Lukas Vrabec 2018-04-18 15:55:22 UTC
*****  Plugin restorecon (99.5 confidence) suggests   ************************

If you want to fix the label. 
/run/systemd/unit-root/run/php-fpm default label should be init_var_run_t.
Then you can run restorecon. The access attempt may have been stopped due to insufficient permissions to access a parent directory in which case try to change the following command accordingly.
Do
# /sbin/restorecon -v /run/systemd/unit-root/run/php-fpm

Comment 2 Juan Orti Alcaine 2018-04-18 16:08:33 UTC
So, whose is this bug? systemd?


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