On Nov 29, 2010, at 1:19 PM, Carl Nobile wrote:
> The only safe place is in the wsgi hook file in 1.2 or before.
That has 2 major problems:
1> Settings aren't yet loaded at that point, so that complicates a
later upgrade to 1.3
2> It seems to lead to the log files being created as root which makes
them unusable later in the app
> If Django 1.3 is able to do it in the settings then you will need to mimic
> how Django 1.3 does it.
Django 1.3 stores the LOGGING_SETTINGS in settings.py, the actual log creation
is done in the Settings class in django.conf.__init__.py whenever that class is
instantiated. Whether this actually works I don't know because my app won't
start up with Django 1.3.
I don't want to go mangling the Django 1.2 code to change that object init
unless I have have no choice and know that the approach is solid.
Thing is, I don't quite understand which chunks of code run as root and where
the switch from root to www-data is made.
Is there some documentation as to which part of the WSGI startup is run as
which user? I read the "Application Issues" docs,
http://code.google.com/p/modwsgi/wiki/ApplicationIssues, but it seems to imply
that the only issue is that files be writable by the unprivileged user.
That's not the problem; the problem is that the log files are *created* by the
root user and owned and writable only by the root user and are therefore not
usable later. Fiddling with the directory permissions isn't going to help; I
need to get the log files *created* by the unprivileged user.
Thanks again for your help,
S
--
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.