I have Ubuntu as an ec2 instance on AWS, where I hosted a Django application using Apache2 and mod_wsgi. In my code I am trying to get the username through os.environ['USERNAME']
statement, which returns a KeyError: 'USERNAME'
, how can I get the username?
I want that username because I need to set permissions for a sqlite datebase file, since I cann't know the username, therefore cann't set the permissions on that file.