title: PermissionError: [Errno 13] Permission denied with gunicorn
body: <p>When I do <code>gunicorn wsgi</code>, I get <code>PermissionError: [Errno 13] Permission denied: '/home/valachio/salvation/config/settings.py'</code> (salvation is the name of the project).</p>
  
  <p>I did most of my troubleshoting with <a href="https://stackoverflow.com/questions/28249115/errno-13-permission-denied-using-gunicorn">this answer</a>, which is the closest to my problem.</p>
  
  <p>When I do <code>ls -lash</code>, the results for my wsgi and settings files look like this:</p>
  
  <pre><code>8.0K ---------- 1 valachio valachio 4.7K Jan  2 17:33 settings.py
  0 -rw-rw-rw- 1 valachio valachio  385 Jan  2 13:56 wsgi.py
  </code></pre>
  
  <p>When I do <code>ps aux | grep gunicorn</code>, I get this:</p>
  
  <pre><code>valachio  3568  0.0  0.0 182924  1108 pts/0    S    11:35   0:00 grep --color=auto gunicorn
  </code></pre>
  
  <p>valachio is my username.  It seems that the current user is the same as the owner of the settings.py file.</p>
  
  <p>Why isn't this working?  What can I try?</p>
  
  <p>I am using the Linux 16.04 LTS sub-system on Windows 10.</p>
  
  <p>Here is the full log after I run <code>gunicorn wsgi</code> - </p>
  
  <pre><code>[2018-01-03 11:28:54 -0500] [3561] [INFO] Starting gunicorn 19.7.1
  [2018-01-03 11:28:54 -0500] [3561] [INFO] Listening at: http://127.0.0.1:8000 (3561)
  [2018-01-03 11:28:54 -0500] [3561] [INFO] Using worker: sync
  [2018-01-03 11:28:54 -0500] [3564] [INFO] Booting worker with pid: 3564
  [2018-01-03 11:28:54 -0500] [3564] [ERROR] Exception in worker process
  Traceback (most recent call last):
    File "/home/valachio/.local/share/virtualenvs/salvation-uBeePQVz/lib/python3.5/site-packages/gunicorn/arbiter.py", line 578, in spawn_worker
      worker.init_process()
    File "/home/valachio/.local/share/virtualenvs/salvation-uBeePQVz/lib/python3.5/site-packages/gunicorn/workers/base.py", line 126, in init_process
      self.load_wsgi()
    File "/home/valachio/.local/share/virtualenvs/salvation-uBeePQVz/lib/python3.5/site-packages/gunicorn/workers/base.py", line 135, in load_wsgi
      self.wsgi = self.app.wsgi()
    File "/home/valachio/.local/share/virtualenvs/salvation-uBeePQVz/lib/python3.5/site-packages/gunicorn/app/base.py", line 67, in wsgi
      self.callable = self.load()
    File "/home/valachio/.local/share/virtualenvs/salvation-uBeePQVz/lib/python3.5/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
      return self.load_wsgiapp()
    File "/home/valachio/.local/share/virtualenvs/salvation-uBeePQVz/lib/python3.5/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
      return util.import_app(self.app_uri)
    File "/home/valachio/.local/share/virtualenvs/salvation-uBeePQVz/lib/python3.5/site-packages/gunicorn/util.py", line 352, in import_app
      __import__(module)
    File "/home/valachio/salvation/config/wsgi.py", line 16, in &lt;module&gt;
      application = get_wsgi_application()
    File "/home/valachio/.local/share/virtualenvs/salvation-uBeePQVz/lib/python3.5/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
      django.setup(set_prefix=False)
    File "/home/valachio/.local/share/virtualenvs/salvation-uBeePQVz/lib/python3.5/site-packages/django/__init__.py", line 19, in setup
      configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
    File "/home/valachio/.local/share/virtualenvs/salvation-uBeePQVz/lib/python3.5/site-packages/django/conf/__init__.py", line 56, in __getattr__
      self._setup(name)
    File "/home/valachio/.local/share/virtualenvs/salvation-uBeePQVz/lib/python3.5/site-packages/django/conf/__init__.py", line 43, in _setup
      self._wrapped = Settings(settings_module)
    File "/home/valachio/.local/share/virtualenvs/salvation-uBeePQVz/lib/python3.5/site-packages/django/conf/__init__.py", line 106, in __init__
      mod = importlib.import_module(self.SETTINGS_MODULE)
    File "/home/valachio/.local/share/virtualenvs/salvation-uBeePQVz/lib/python3.5/importlib/__init__.py", line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "&lt;frozen importlib._bootstrap&gt;", line 986, in _gcd_import
    File "&lt;frozen importlib._bootstrap&gt;", line 969, in _find_and_load
    File "&lt;frozen importlib._bootstrap&gt;", line 958, in _find_and_load_unlocked
    File "&lt;frozen importlib._bootstrap&gt;", line 673, in _load_unlocked
    File "&lt;frozen importlib._bootstrap_external&gt;", line 661, in exec_module
    File "&lt;frozen importlib._bootstrap_external&gt;", line 766, in get_code
    File "&lt;frozen importlib._bootstrap_external&gt;", line 818, in get_data
  PermissionError: [Errno 13] Permission denied: '/home/valachio/salvation/config/settings.py'
  [2018-01-03 11:28:54 -0500] [3564] [INFO] Worker exiting (pid: 3564)
  [2018-01-03 11:28:55 -0500] [3561] [INFO] Shutting down: Master
  [2018-01-03 11:28:55 -0500] [3561] [INFO] Reason: Worker failed to boot.
  </code></pre>