Redis: Failed opening .rdb for saving: Permission denied

后端 未结 13 1443
误落风尘
误落风尘 2020-12-05 02:00

I have a redis server 2.8 installed using ubuntu apt-get on ubuntu 12.04.

I have copied a dump.rdb from an other database. Now when I try to start the new server, I

13条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-05 02:23

    My /lib/system/systemd/redis-server.service file contained the following:

    ReadOnlyDirectories=/
    ReadWriteDirectories=-/var/lib/redis
    

    My /etc/redis/redis.conf file stated that the database should be located in /data/redis

    dir /data/redis
    

    The systemd config file above effectively makes /data/redis read-only.

    Once I changed the redis.conf file to read:

    dir /var/lib/redis
    

    I stopped getting the error.

提交回复
热议问题