Redis telling me "Failed opening .rdb for saving: Permission denied"
<p>I'm running Redis server 2.8.17 on a Debian server 8.5.  I'm using Redis as a session store for a Django 1.8.4 application.</p>

<p>I haven't changed the software configuration on my server for a couple of months and everything was working just fine until a week ago when Django began raising the following error:</p>

<pre><code>MISCONF Redis is configured to save RDB snapshots but is currently not able to persist to disk.  Commands that may modify the data set are disabled.  Please check Redis logs for details...
</code></pre>

<p>I checked the redis log and saw this happening about once a second:</p>

<pre><code>1 changes in 900 seconds.  Saving...
Background saving started by pid 22213
Failed opening .rdb for saving: Permission denied
Background saving error
</code></pre>

<p>I've read these two SO questions <a href="https://stackoverflow.com/questions/22160753/redis-failed-opening-rdb-for-saving-permission-denied">1</a>, <a href="https://stackoverflow.com/questions/19581059/misconf-redis-is-configured-to-save-rdb-snapshots?rq=1">2</a> but they haven't helped me find the problem.</p>

<p>ps shows that user "redis" is running the server:</p>

<pre><code>redis   26769   ...   /usr/bin/redis-server *.6379
</code></pre>

<p>I checked my config file for the redis file name and path:</p>

<pre><code>grep ^dir /etc/redis/redis.conf =&gt;
dir /var/lib/redis

grep ^dbfilename /etc =&gt;
dbfilename dump.rdb
</code></pre>

<p>The permissons on /var/lib/redis are 755 and it's owned by redis:redis.
The permissons on /var/lib/redis/dump.rdb are 644 and it's owned by redis:redis too.</p>

<p>I also ran strace on the server process:</p>

<pre><code>ps -C redis-server  # pid = 26769
sudo strace -p 26769 -o /tmp/strace.out
</code></pre>

<p>But when I examine the output, I don't see any errors.  In particular I don't see a "Permission denied" error as I would expect.</p>

<p>Also, /var/lib/redis is not an NFS directory.</p>

<p>Does anyone know what else could be causing this?  I'd hate to have to stop using Redis.  I know I can run the command "set stop-writes-on-bgsave-error yes" but that doesn't solve the problem.</p>

<p>This is now happening on a daily basis and the only way I can stop the error is to restart the Redis server.</p>

<p>Thanks.</p>