skip to Main Content

I have redis 6.0.9 installed on my server. I am unable to save ACLs and config rewrite. I have included ACL file in my redis.conf to save acl in that file.
My redis.service file

Description=Redis In-Memory Data Store
After=network.target

[Service]
User=redis
Group=redis
ExecStart=/usr/local/bin/redis-server /etc/redis/redis.conf
ExecStop=/usr/local/bin/redis-cli shutdown
Restart=always
ReadWriteDirectories=-/var/lib/redis

[Install]
WantedBy=multi-user.target

my redis logs

13583:M 07 Dec 2020 08:22:25.026 # systemd supervision requested, but NOTIFY_SOCKET not found
13583:M 07 Dec 2020 08:22:25.026 # systemd supervision requested, but NOTIFY_SOCKET not found
13583:M 07 Dec 2020 08:22:56.275 # Opening temp ACL file for ACL SAVE: Permission denied                                                                          13583:M 07 Dec 2020 08:24:38.908 # Opening temp ACL file for ACL SAVE: Permission denied
13583:M 07 Dec 2020 08:24:44.180 # Could not create tmp config file (Permission denied)
13583:M 07 Dec 2020 08:24:44.180 # CONFIG REWRITE failed: Permission denied

2

Answers


  1. Chosen as BEST ANSWER

    Solved it by creating redis directory in /var/run and gave ownership of directory to redis. Now it is saving ACL to defined path in redis.conf.


  2. I was running into the same issue. It seems that ACL SAVE creates a temporary file in the same directory as the aclfile being overwritten (source). Therefore, it’s not enough for the server to have permission to write to the file, it must also have permission to write to the file’s directory.

    CONFIG REWRITE, on the other hand, creates a temporary file in /tmp (source) so it needs write access to this directory as well as the config file’s directory in order to move the file. in my experience most systems configure /tmp such that any user can access it by default so I’m a little surprised the command is failing at this point.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search