• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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