I am using a redis docker container which reads its configuration file from a separate data-only container. Right now I set the redis.conf file using another container. Now I was experimenting around and I tried using the
> config rewrite
command and I get:
> (error) ERR Rewriting config file: Permission denied
I can't figure out why permission is denied. Any help is appreciated.
I think redis will create a new temp file on the same folder as the current config file. Then replace the current config file with the temp file.
So it need a permission to write new file in the path.
For example, if your config file is /etc/redis/redis.conf, you have to ensure redis have write permission with /etc/redis/ folder.
For redis:7 docker image, you should do docker exec -u root redis_containenr chown redis:redis /etc/redis
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With