I have a Django website running via nginx
under user www-data
and gunicorn
under user myuser
bound at /run/gunicorn.sock
.
nginx
works just fine; it acts as a proxy to the gunicorn
Unix domain socket. I'm not having any problems with nginx
.
redis-server
also works just fine. It's domain socket is at /var/run/redis/redis-server.sock
.
When I enable CACHES in my Django settings file, I get the following exception from gunicorn
:
Error 13 connecting to unix socket: /run/redis/redis-server.sock. Permission denied.
Using ps aux | grep redis
, I find that /usr/bin/redis-server
is running under the redis
user, which is totally expected and acceptable, I think. I have added myuser
to the redis
group, and restarted the server. I continue to receive that exception.
What am I doing wrong? How can I get the two daemons to work together: gunicorn
and redis-server
?