Why does redis need write permissions for redis.conf?

0

I just installed redis on an Ubuntu server. When I examined its file permissions, I saw

-rw-r----- 1 redis redis 59124 Jan 11 02:24 /etc/redis/redis.conf

  1. Why does the redis user need write access to the conf file?
  2. Would it be more secure to change the permissions to -r--r-----? If so, what are the downsides (if any) to doing this?

tcjulian

Posted 2019-01-11T02:48:54.940

Reputation: 3

Answers

0

A little late, but I expect this is because the command CONFIG REWRITE was introduced in Redis 2.8.0 which rewrites the redis.conf file to match the currently configured process.

Adam

Posted 2019-01-11T02:48:54.940

Reputation: 116

Thanks! This seems like even more reason to do rename-command CONFIG "" – tcjulian – 2019-01-31T04:22:32.647

I would recommend renaming it to a guid only you (or other redis admins) know, since being able to change config values without restarting the server is very valuable when making a highly-available service. – Adam – 2019-02-11T18:44:07.560