Let's say that the Django site lives on a production server in /var/virtualenvs/sitename with a directory structure like this:
/var/virtualenvs/sitename/ logs/ access.log error.log ... media/ ... src/ app_1/ app_2/ django_project_name/ manage.py django_project_name/ settings.py urls.py wsgi.py static/ ...
What is the best way to assign ownership and permissions for these files in a secure production environment?
Suppose nginx is used as a reverse proxy in the configuration, and Gunicorn as a Django service (although common answers applicable to other tools would also help).
source share