redis server version 7.2.5 configure ACL

Step 1: Configure Redis with a Strong Password Edit redis.conf to set a strong password: sudo nano /etc/redis/redis.conf requirepass admin (for example)

   sudo systemctl restart redis

   redis-cli
       AUTH admin

       ACL SETUSER aung +@admin

       ACL SETUSER aung on >123 ~* +@all +@dangerous
       ACL SETUSER default -@dangerous

       CONFIG REWRITE (permission denied problem, couldn't save)

Even if I changed the file permission, (security concern) still issue permission denied. sudo chmod 777 /etc/redis/redis.conf

when I restarted the redis server, all the ACL configuration gone. please kinldy help, how to resolve this issue. thanks!

Comment From: sundb

what is the actual error reply? you can try to give permission of the conf dir to the user, because config write need to create a temp conf file.

Comment From: Raspberries1984

what is the actual error reply? you can try to give permission of the conf dir to the user, because config write need to create a temp conf file.

The actual error reply was: 127.0.0.1:6379> CONFIG REWRITE (error) ERR Rewriting config file: Permission denied

Comment From: sundb

@Raspberries1984 please try https://github.com/redis/redis/issues/13462#issuecomment-2268091459

Comment From: Raspberries1984

@Raspberries1984 please try #13462 (comment)

@sundb I tried giving the permission to the user. But still permission denied. sudo chmod 777 /etc/redis/redis.conf

am i right?

Comment From: sundb

@sundb I tried giving the permission to the user. But still permission denied. sudo chmod 777 /etc/redis/redis.conf

should be sudo chmod 777 /etc/redis

Comment From: Raspberries1984

@sundb I tried giving the permission to the user. But still permission denied. sudo chmod 777 /etc/redis/redis.conf

should be sudo chmod 777 /etc/redis

Thanks a lot! it works.