Answer the question
In order to leave comments, you need to log in
How to set environment variables for a user who doesn't have a shell?
Linux Mint.
There is a wsgi application that runs as www-data. The task is to pass some settings to the application through environment variables. I'm trying to get them through os.environ. I write variables in /etc/environment, but the application does not see them. I output everything that is in os.environ:
environ({'MAILTO': '-----', 'LANG': 'en_US.UTF-8', 'PWD': '/var/www/site', 'SHELL': '/bin/sh', 'LOGNAME': 'www-data', 'PATH': '/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin', 'OLDPWD': '/var/www', 'HOME': '/var/www'})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question