Bug 1034310 - SELinux is preventing /usr/sbin/php-fpm from 'unlink' accesses on the sock_file localhost.sock.
Summary: SELinux is preventing /usr/sbin/php-fpm from 'unlink' accesses on the sock_fi...
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 20
Hardware: i686
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:a5f808343dbc7f2c34e34724b51...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-25 14:55 UTC by Mikhail
Modified: 2014-08-22 13:15 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-22 13:15:09 UTC
Type: ---


Attachments (Terms of Use)

Description Mikhail 2013-11-25 14:55:21 UTC
Description of problem:
SELinux is preventing /usr/sbin/php-fpm from 'unlink' accesses on the sock_file localhost.sock.

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

If you believe that php-fpm should be allowed unlink access on the localhost.sock sock_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:
# grep php-fpm /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:httpd_t:s0
Target Context                system_u:object_r:var_run_t:s0
Target Objects                localhost.sock [ sock_file ]
Source                        php-fpm
Source Path                   /usr/sbin/php-fpm
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           php-fpm-5.5.6-1.fc20.i686
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-90.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.12.0-2.fc21.i686+PAE #1 SMP Sat
                              Nov 9 21:31:51 UTC 2013 i686 i686
Alert Count                   2
First Seen                    2013-11-25 20:46:05 YEKT
Last Seen                     2013-11-25 20:46:10 YEKT
Local ID                      8f9d43b8-ed67-4cea-8940-eb01de39dcac

Raw Audit Messages
type=AVC msg=audit(1385390770.75:799): avc:  denied  { unlink } for  pid=13748 comm="php-fpm" name="localhost.sock" dev="tmpfs" ino=3598155 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=sock_file


type=SYSCALL msg=audit(1385390770.75:799): arch=i386 syscall=unlink success=no exit=EACCES a0=bf9664ce a1=ffffffa0 a2=b7847140 a3=bf9664cc items=0 ppid=1 pid=13748 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=php-fpm exe=/usr/sbin/php-fpm subj=system_u:system_r:httpd_t:s0 key=(null)

Hash: php-fpm,httpd_t,var_run_t,sock_file,unlink

Additional info:
reporter:       libreport-2.1.9
hashmarkername: setroubleshoot
kernel:         3.12.0-2.fc21.i686+PAE
type:           libreport

Comment 1 Daniel Walsh 2013-11-25 15:03:11 UTC
Where does localhost.sock come from?

ps -eZ | grep initrc_t

Comment 2 Mikhail 2013-11-25 15:33:07 UTC
[root@ws166 php-fpm.d]# ps -eZ | grep initrc_t
[root@ws166 php-fpm.d]#

Comment 3 Daniel Walsh 2013-11-25 15:40:24 UTC
Any idea where this socket file came from?


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