On 25 November 2011 18:28, Chunlin Zhang <[email protected]> wrote: > I user ubuntu 10.04 Apache/2.2.14 mod_wsgi 2.8. > I use WSGIDaemonProcess server user=demon group=demon ,but when I > print >> sys.stderr,os.environ,I see the result: > ''' > [Fri Nov 25 15:23:12 2011] [error] {'LANG': 'C', 'SHLVL': '1', > 'APACHE_RUN_USER': 'www-data', 'APACHE_PID_FILE': '/var/run/ > apache2.pid', 'PWD': '/', 'APACHE_RUN_GROUP': 'www-data', 'PATH': '/ > usr/local/bin:/usr/bin:/bin', '_': '/usr/sbin/apache2'} > ''' > How can I change the user wsgi running?
You can't tell from APACHE_RUN_USER variable that will only say what Apache child worker processes run as, not mod_wsgi daemon processes. You need to use: >>> import os >>> os.geteuid() 501 Then see what the uid matches to in /etc/passwd file. Also make sure you have a WSGIProcessGroup directive that tells your app to run in daemon process group configured by WSGIDaemonProcess. Graham -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
