Additional info: libreport version: 2.0.13 kernel: 3.6.0-0.rc6.git0.2.fc18.x86_64 description: :SELinux is preventing /usr/sbin/php-fpm from 'write' accesses on the sock_file /var/lib/mysql/mysql.sock. : :***** Plugin catchall (100. confidence) suggests *************************** : :If you believe that php-fpm should be allowed write access on the mysql.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:phpfpm_t:s0 :Target Context system_u:object_r:mysqld_var_run_t:s0 :Target Objects /var/lib/mysql/mysql.sock [ sock_file ] :Source php-fpm :Source Path /usr/sbin/php-fpm :Port <Unknown> :Host (removed) :Source RPM Packages php-fpm-5.4.7-5.fc18.x86_64 :Target RPM Packages :Policy RPM selinux-policy-3.11.1-21.fc18.noarch :Selinux Enabled True :Policy Type targeted :Enforcing Mode Permissive :Host Name (removed) :Platform Linux (removed) 3.6.0-0.rc6.git0.2.fc18.x86_64 #1 : SMP Mon Sep 17 17:29:08 UTC 2012 x86_64 x86_64 :Alert Count 1 :First Seen 2012-09-26 11:30:02 EDT :Last Seen 2012-09-26 11:30:02 EDT :Local ID 73571307-d649-4feb-8b31-b1b52ebac118 : :Raw Audit Messages :type=AVC msg=audit(1348673402.335:1074): avc: denied { write } for pid=22995 comm="php-fpm" name="mysql.sock" dev="sdb3" ino=1840001 scontext=system_u:system_r:phpfpm_t:s0 tcontext=system_u:object_r:mysqld_var_run_t:s0 tclass=sock_file : : :type=AVC msg=audit(1348673402.335:1074): avc: denied { connectto } for pid=22995 comm="php-fpm" path="/var/lib/mysql/mysql.sock" scontext=system_u:system_r:phpfpm_t:s0 tcontext=system_u:system_r:mysqld_t:s0 tclass=unix_stream_socket : : :type=SYSCALL msg=audit(1348673402.335:1074): arch=x86_64 syscall=connect success=yes exit=0 a0=4 a1=7fff72793490 a2=6e a3=4000 items=0 ppid=22990 pid=22995 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=4294967295 comm=php-fpm exe=/usr/sbin/php-fpm subj=system_u:system_r:phpfpm_t:s0 key=(null) : :Hash: php-fpm,phpfpm_t,mysqld_var_run_t,sock_file,write : :audit2allow : :#============= phpfpm_t ============== :allow phpfpm_t mysqld_t:unix_stream_socket connectto; :allow phpfpm_t mysqld_var_run_t:sock_file write; : :audit2allow -R : :#============= phpfpm_t ============== :allow phpfpm_t mysqld_t:unix_stream_socket connectto; :allow phpfpm_t mysqld_var_run_t:sock_file write; :
Created attachment 617614 [details] File: type
Created attachment 617615 [details] File: hashmarkername
*** Bug 860724 has been marked as a duplicate of this bug. ***
Bug 860724 happens when php-fpm tries to connect to a MySQL server through a tcp socket "mysql_connect('X.X.X.X:3306')", whereas this bug affects php-fpm when connecting to a unix socket. "mysql_connect(':/var/lib/mysql/mysql.sock')". There are a few more of these policy issues with php-fpm that I'm running into as I set my development environment up. Would it be preferable if I compile them into a single bug report, and what should I include, or should I continue using the SELinux alert tool to submit them individually?
No bundle them together into this report is fine.
*** This bug has been marked as a duplicate of bug 861975 ***