Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
(In reply to Daniel Walsh from comment #1)
> Looks like we would need to back port redis policy to make this work.
>
> For now you could add a custom policy module.
Ok, I will.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHBA-2015-1375.html
It seems that the patch was lost somewhere around the git repository...
On a rhel7 it was working fine because of the following policy rule:
sesearch -A -s httpd_t -t redis_var_run_t -c sock_file -p write ; echo $?
# Found 1 semantic av rules:
allow domain pidfile : sock_file { write getattr append open } ;
0
but I don't have any output querying the selinux target policy on a rhel8 with the following command:
# sesearch -A -s httpd_t -t redis_var_run_t -c sock_file -p write ; echo $?
0
Do I have to open a new bugzilla report?
Sorry to publish this here, but I couldn't find where to post a bug for EPEL packages. Description of problem: php-fpm can't write/read to/from the redis socket Version-Release number of selected component (if applicable): selinux-policy-3.7.19-260.el6_6.1.noarch How reproducible: First, configure redis to use a socket at /var/run/redis/redis.sock (where the PID is by default). then, try to use redis from php: <?php ini_set( 'display_errors', 'On' ); $redis = new Redis(); $redis->pconnect( '/var/run/redis/redis.sock' ); echo 'sending ping... '; echo $redis->ping() . "\n"; echo 'setting name ... ' . "\n"; $redis->set( 'Name', 'Renich Bon Ciric' ); echo 'getting name. The name is: '; echo $redis->get( 'Name' ) . "\n"; ?> Actual results: [root@web1 public]# ausearch -i -sv no -ts recent ---- type=SYSCALL msg=audit(01/02/2015 15:33:08.834:23071) : arch=x86_64 syscall=connect success=no exit=-13(Permission denied) a0=0x5 a1=0x7ffffc01ce60 a2=0x1b a3=0x1f3d1a0 items=0 ppid=21091 pid=21103 auid=root uid=apache gid=apache euid=apache suid=apache fsuid=apache egid=apache sgid=apache fsgid=apache tty=(none) ses=3433 comm=php-fpm exe=/usr/sbin/php-fpm subj=unconfined_u:system_r:httpd_t:s0 key=(null) type=AVC msg=audit(01/02/2015 15:33:08.834:23071) : avc: denied { write } for pid=21103 comm=php-fpm name=redis.sock dev=dm-2 ino=1701412 scontext=unconfined_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:var_run_t:s0 tclass=sock_file ---- type=SYSCALL msg=audit(01/02/2015 15:33:08.833:23070) : arch=x86_64 syscall=connect success=no exit=-13(Permission denied) a0=0x5 a1=0x7ffffc01abc0 a2=0x1b a3=0x1f43840 items=0 ppid=21091 pid=21103 auid=root uid=apache gid=apache euid=apache suid=apache fsuid=apache egid=apache sgid=apache fsgid=apache tty=(none) ses=3433 comm=php-fpm exe=/usr/sbin/php-fpm subj=unconfined_u:system_r:httpd_t:s0 key=(null) type=AVC msg=audit(01/02/2015 15:33:08.833:23070) : avc: denied { write } for pid=21103 comm=php-fpm name=redis.sock dev=dm-2 ino=1701412 scontext=unconfined_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:var_run_t:s0 tclass=sock_file [root@web1 public]# ausearch -i -sv no -ts recent | audit2allow #============= httpd_t ============== allow httpd_t var_run_t:sock_file write; Expected results: It should write and read the var.