• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

Question Redis Unix Socket Connection Permission denied, TCP Connection working

Sally1

Regular Pleskian
Hello,

I have the Redis Object Cache Plugin installed on my website, connected via TCP to Redis Server is working fine. I try now to connect via Unix Socket, but get Connection Exception: Permission denied (RedisException).



Changed Redis to use Unix Socket

unixsocket /var/run/redis/redis.sock
unixsocketperm 770



redis.log

17960:M 14 Dec 2020 14:36:25.895 * Ready to accept connections
17960:M 14 Dec 2020 14:36:25.895 * The server is now ready to accept connections at /var/run/redis/redis.sock



ls -la /var/run/redis/

insgesamt 0

drwxr-xr-x 2 redis redis 60 15. Dez 09:49 .

drwxr-xr-x 34 root root 1060 15. Dez 09:49 ..

srwxrwx--- 1 redis redis 0 15. Dez 09:49 redis.sock


wp-config settings


define(‘WP_REDIS_SCHEME’, ‘unix’);
define(‘WP_REDIS_PATH’, ‘/var/run/redis/redis.sock’);



Server

CentOS Linux 7.9.2009 (Core)

Plesk Obsidian 18.0.32 Update1

PHP-FPM 7.4.13

MariaDB 10.5.8



Can someone help me?


Thank You!
 
Hello,

I have the Redis Object Cache Plugin installed on my website, connected via TCP to Redis Server is working fine. I try now to connect via Unix Socket, but get Connection Exception: Permission denied (RedisException).



Changed Redis to use Unix Socket

unixsocket /var/run/redis/redis.sock
unixsocketperm 770



redis.log

17960:M 14 Dec 2020 14:36:25.895 * Ready to accept connections
17960:M 14 Dec 2020 14:36:25.895 * The server is now ready to accept connections at /var/run/redis/redis.sock



ls -la /var/run/redis/

insgesamt 0

drwxr-xr-x 2 redis redis 60 15. Dez 09:49 .

drwxr-xr-x 34 root root 1060 15. Dez 09:49 ..

srwxrwx--- 1 redis redis 0 15. Dez 09:49 redis.sock


wp-config settings


define(‘WP_REDIS_SCHEME’, ‘unix’);
define(‘WP_REDIS_PATH’, ‘/var/run/redis/redis.sock’);



Server

CentOS Linux 7.9.2009 (Core)

Plesk Obsidian 18.0.32 Update1

PHP-FPM 7.4.13

MariaDB 10.5.8



Can someone help me?


Thank You!
Was you able to fix that issue?
I'm facing the same problem.
Even when I run the command: sudo chown -R redis:www-data /var/run/redis
If I restart redis-server
the folder /var/run/redis owner becomes: redis redis again
drwxr-sr-x 2 redis redis
and files inside is the same:
srwxrwxr-x 1 redis redis 0 Oct 4 21:34 redis-server.sock
 
Edit /etc/group. In the line that starts with redis, append "www-data".
e.g.:
redis:x:123:wwwadmin,www-data
See also: `man 5 group`
 
Back
Top