On Apr 4, 11:37 pm, mike <[EMAIL PROTECTED]> wrote:
> I had this issue and was able to correct it by adding the following to
> my settings.py
>
> import os
> os.environ['PYTHON_EGG_CACHE'] = '/tmp'
>
> Hope this helps somebody

Using '/tmp' as the Python egg cache is actually not a good idea. This
is because you can't control who puts what in there and with what
permissions. This can cause errors if someone else has created
something in there with a conflicting name. Worse is that someone else
with access to that machine could put a modified version of an
unpacked Python egg in that directory which your application would use
and which did things like steal passwords and other account
information from your application.

You should always create a dedicated directory for the Python egg
cache for use by Apache when using mod_python or embedded mode of
mod_wsgi. Better still, use daemon mode of mod_wsgi and run your code
as a specific user with its own home directory where it can store the
cache.

Graham

> On Apr 3, 7:32 am, "Jon Lathem" <[EMAIL PROTECTED]> wrote:
>
> > Graham,
>
> > Thanks for your quick response.  It was a SELinux problem.  And i realize
> > that chmoding to 777 is a bad idea, at the time I was just trying to get it
> > to work.
>
> > Jon
>
> > On Wed, Apr 2, 2008 at 5:47 PM, Graham Dumpleton <[EMAIL PROTECTED]>
> > wrote:
>
> > > On Apr 3, 12:54 am, JLathem <[EMAIL PROTECTED]> wrote:
> > > > The first time I boot my server and view my django app I get the
> > > > following message
>
> > > ===========================================================================
> > > > ExtractionError: Can't extract file(s) to egg cache
>
> > > > The following error occurred while trying to extract file(s) to the
> > > > Python egg
> > > > cache:
>
> > > >   [Errno 13] Permission denied: '/egg_cache/bgy/MySQL_python-1.2.2-
> > > > py2.4-linux-i686.egg-tmp'
>
> > > > The Python egg cache directory is currently set to:
>
> > > >   /egg_cache/bgy
>
> > > > Perhaps your account does not have write access to this directory?
> > > > You can
> > > > change the cache directory by setting the PYTHON_EGG_CACHE environment
> > > > variable to point to an accessible directory.
>
> > > ===========================================================================
>
> > > > After doing a "service httpd restart" everything works fine.  I have
> > > > read the documentation here (http://www.djangoproject.com/
> > > > documentation/modpython/) about setting the egg cache path and I've
> > > > done that (you can see in the error message that I am not using the
> > > > standard egg path).  I have also tried it without setting the egg path
> > > > and I get the same error.  I made apache the owner and group of the
> > > > egg cache folder and also chmod 777 on the folder with still no luck.
> > > > Can someone help me out and tell me what I am missing?
>
> > > Do you have SELinux enabled?
>
> > > BTW, setting a directory to 777 permissions is really bad.
>
> > > Send a 'ls -las' listing output of '/egg_cache/'.
>
> > > Graham
>
> > --
> > Thanks
>
> > Jon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to