Attention

This document was written for an old version of Plone, Plone 2.5.x, and was last updated 1568 days ago.

To learn how to upgrade to the current version of Plone, read the upgrade manual.

Permission denied: ... .python-eggs

by Steve McMahon last modified Feb 04, 2009 03:07 AM
Product installation failure due to failure to create egg cache

Some Python libraries, notably the Python-MySQL library, are distributed in compressed Python eggs that need to be uncompressed into a cache directory.

Unless you specify a target directory for this cache, Python will try to create it in $HOME/.python-eggs. If you're running Zope under a special user id and with mimimum permissions (as you should), Python may not be able to create the cache directory.

Fixing via buildout

Edit your buildout.cfg to add an environment variable specification pointing to the buildout's var directory to the zope2instance section(s). Then, run bin/buildout.

[instance]
recipe = plone.recipe.zope2instance

...

environment-vars =
    PYTHON_EGG_CACHE ${buildout:directory}/var/.python-eggs

Fixing in an old-style install

The easiest way to solve this problem is to edit your Zope startup script (usually bin/zopectl) to specify a writable location for the cache. Look in zopectl for the line:

export PYTHONPATH INSTANCE_HOME SOFTWARE_HOME

and change it to two lines:

PYTHON_EGG_CACHE="$INSTANCE_HOME/var/.python-eggs"
export PYTHONPATH INSTANCE_HOME SOFTWARE_HOME PYTHON_EGG_CACHE