durusmail: durus-users: Oddity with eggs
Oddity with eggs
2006-08-30
2006-08-31
Oddity with eggs
Mike Orr
2006-08-30
Apparently when using eggs, the user's home directory must be
writeable.  In this case the user is apache, a daemon account with
home dir /var/www, which it can't write.


Traceback (most recent call last):
  File "bin/cameo_server.py", line 3, in ?
    from durus.client_storage import ClientStorage
  File "build/bdist.linux-i686/egg/durus/client_storage.py", line 7, in ?
  File "build/bdist.linux-i686/egg/durus/serialize.py", line 9, in ?
  File "build/bdist.linux-i686/egg/durus/persistent.py", line 15, in ?
  File "build/bdist.linux-i686/egg/durus/_persistent.py", line 7, in ?
  File "build/bdist.linux-i686/egg/durus/_persistent.py", line 4, in
__bootstrap__
  File "/usr/local/lib/python2.4/setuptools-0.6a10-py2.4.egg/pkg_resources.py",
line 799, in resource_filename
    return get_provider(package_or_requirement).get_resource_filename(
  File "/usr/local/lib/python2.4/setuptools-0.6a10-py2.4.egg/pkg_resources.py",
line 1187, in get_resource_filename
    self._extract_resource(manager, self._eager_to_zip(name))
  File "/usr/local/lib/python2.4/setuptools-0.6a10-py2.4.egg/pkg_resources.py",
line 1204, in _extract_resource
    real_path = manager.get_cache_path(self.egg_name, self._parts(zip_path))
  File "/usr/local/lib/python2.4/setuptools-0.6a10-py2.4.egg/pkg_resources.py",
line 836, in get_cache_path
    ensure_directory(target_path)
  File "/usr/local/lib/python2.4/setuptools-0.6a10-py2.4.egg/pkg_resources.py",
line 2301, in ensure_directory
    os.makedirs(dirname)
  File "/usr/lib/python2.4/os.py", line 156, in makedirs
    makedirs(head, mode)
  File "/usr/lib/python2.4/os.py", line 156, in makedirs
    makedirs(head, mode)
  File "/usr/lib/python2.4/os.py", line 159, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/var/www/.python-eggs'


The directory appears to contain temporary directories for each egg in
use.  It's not a big deal but it is suprising, and it means one more
security lockdown you can't do.

--
Mike Orr 
reply