who creates the media folder in django and how to change permission rights?
Coulnd't find out who exactly is it created by, however, the permissions depend on the user (root or non root). 
This means if you run the commands (for example: python manage.py runserver) with sudo or under root the folder gets root permissions which can't be edited from a non root user.
I set up django using nginx and gunicorn. I am looking at the permission in my project folder and I see that the permission for the media folder is set to root (all others are set to debian): 
-rw-r--r-- 1 root   root    55K Dec  2 13:33 media
I am executing all app relevant commands like makemigrations, migrate, collectstatic, from debian, therefore everything else is debian.
But the media folder doesn't exist when I start my app. I will be created once I upload stuff. 
But who creates it and how do I change the permissions to debain?