What setup.py file are you talking about? What is your Apache configuration for mod_WSGI? Ie., what mod_WSGI directives etc?
Graham On Tuesday, November 30, 2010, [email protected] <[email protected]> wrote: > I know that Django 1.3 adds Python logging (finally), but I'm using 1.2, for > the moment. > > I attempted to initialize logging in setup.py, but found that log files were > being created with root privs. The two that are www-data I did by hand: > > -rw-r----- 1 root 0 Nov 28 21:03 tbp_dc.log > -rw-r----- 1 www-data 548580 Nov 28 21:03 tbp_dc.log.1 > -rw-r--r-- 1 www-data 40651 Nov 21 20:50 tbp_dc.log.2.gz > > So, it seems that, until Django's all running (i.e. handling an actual > request?) it's running as root. > > Then, when it switches to www-data, I can't write to the log files. > > Django 1.3 handles initialization of loggers in the Settings class > initialization in django.conf.__init__.py but I'm a little unclear as to > exactly when this Settings() object is created. > > If the user's still root when this is called, Django 1.3 has the same problem > I have; the logs won't actually be writable. > > Does anyone have any insight as to where this initialization can safely be > done i.e. when I've already switched to being www-data? > > Thanks, > > S > aka/ssteinerX > aka/Steve Steiner > > > > -- > 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. > > -- 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.
