Php permission denied on connection to /tmp/redis.socket on cpanel

0

I have installed redis on my Cpanel Centos 6.9 VPS and successfully connected to it via tcp. I wanted to share redis.socket connection instead of tcp with several users on my vps but failing to do so as php throws an error with permission denied.

I have already tried to set permission to /tmp/redis.socket 755, even to 777, though I understand that there is no point in that as it only adds write permission.

I have tried to run service as redis user and relocate socket location to /home/redis/redis.socket.

But no matter what I try it throws permission denied error.

I also understand that giving access to socket of single instance to multiple users may cause problems, but I do manage most of the sites on my vps, so it should not be an issue.

Could you please help me. Thanks.

Andrius Solopovas

Posted 2018-03-31T11:58:31.647

Reputation: 193

Answers

0

I managed to connect via socket by running redis with redis:redis user and changing location of socket file in config to /var/lib/redis/redis.sock and setting permissions to 777, as well as I had to set dir settings to folder where redis user had an access to, and I could not write into /var/log/redis.log so had to move redis log to its home directory.

Andrius Solopovas

Posted 2018-03-31T11:58:31.647

Reputation: 193