title: How to avoid permission denied with caching files in Django?
body: <p>I keep getting this issue from my django website, every time I have to go the path to remove the root access for all files and give access to the current user with <code>chown user_name:user_group *</code>, and it works. But after the website generating some new cached files, the problem gets back.</p>
  
  <pre><code>Internal Server Error: /
  
  PermissionError at /
  [Errno 13] Permission denied:'/var/tmp/project_cache/a92ccb8f0f5dc3d17dbaae74ac7.djcache'
  </code></pre>
  
  <p>I use django cache based on files. Here is my settings</p>
  
  <pre><code>CACHES = {
  'default': {
      'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
      'LOCATION': '/var/tmp/project_cache',
      'TIMEOUT': 60 * 15,
      'OPTIONS': {
          'MAX_ENTRIES': 1000
      }
  }
  }
  </code></pre>
  
  <p>Do I need to never user cache with files?</p>