Topic: Redis 6.0.9 config rewrite permission problem

Hello,
After upgrading redis package 6.0.8 to 6.0.9 from Remi's Centos 8 modular repo the config rewriting started to fail.

In 6.0.9 the CONFIG REWRITE command ends with Permission denied error for both redis and redis-sentinel.

redis.log:
# Could not create tmp config file (Permission denied)
# CONFIG REWRITE failed: Permission denied

Pull #7824 changed how config file rewriting is handled in version 6.0.9.

[pid  1344] openat(AT_FDCWD, "/etc/redis.conf.z5vREX", O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0600) = -1 EACCES (Permission denied)

To overcome this situation I suggest to create a /etc/redis directory which is writable by redis and move redis.conf and redis-sentinel.conf to /etc/redis.

Re: Redis 6.0.9 config rewrite permission problem

> To overcome this situation I suggest to create a /etc/redis directory which is writable by redis and move redis.conf and redis-sentinel.conf to /etc/redis.

This doesn't seems doable easily without breaking existing user configuration sad

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Redis 6.0.9 config rewrite permission problem

Waiting for upstream about this
https://github.com/redis/redis/issues/8051

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Redis 6.0.9 config rewrite permission problem

Will try to submit a patch to use the old way as a fallback, after the week-end

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Redis 6.0.9 config rewrite permission problem

Fix proposal send upstream https://github.com/redis/redis/pull/8058

Please try version 6.0.9-2 which includes this fix.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Redis 6.0.9 config rewrite permission problem

Can you please give a try to version 6.0.9-3 which you can download in temp folder


This update move configurations to /etc/redis/


NOTICE: looks like the CONFIG REWRITE feature have never worked with selinux enabled, so
https://bugzilla.redhat.com/1900689

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Redis 6.0.9 config rewrite permission problem

6.0.9-4 is better as it adds symlink for old path, to avoid breaking all deployment tools

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi