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

Desktop: Fedora 33 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 32 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: Redis 6.0.9 config rewrite permission problem

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

Desktop: Fedora 33 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 32 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

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

Desktop: Fedora 33 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 32 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

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.

Desktop: Fedora 33 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 32 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

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

Desktop: Fedora 33 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 32 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

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

Desktop: Fedora 33 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 32 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test