1
I'd like my PHP web application (run as user apache
) to connect to redis via a UNIX socket. So I thought of running redis as user apache
as well and the socket permissions can be 0700 owned by apache
. But I also want the socket in /var/run
, which is owned by root
and not writable by apache
.
So if I run redis as root
, my PHP app cannot connect unless I open the socket permissions, which I'd rather not do if I can avoid it.
How do I square this circle? (Redis is managed by systemd)