[Distutils] [buildout] setuptools/buildout trying to use /root/.python-eggs after setuid()ing with Zope
Jim Fulton
jim at zope.com
Wed Feb 4 18:46:02 CET 2009
On Feb 4, 2009, at 11:17 AM, Andreas Jung wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi there,
>
> I am not sure which component is in charge for the following issue:
>
> - standard Plone 3.1 installation installed with paster/Zopeskel
> with a 'zope' account without special privileges
> - in the instance is started from through /etc/init.d as root
> but immediately setuid to effective-user 'zope'
>
> - after setuid(), setuptools is trying to write to /root/.python-eggs
> during the startup-phase for (my own) module zopyx.textindexng3
>
> - - it creates inside:
>
> new:~/.python-eggs # ls -la
> total 1
> drwxrwxrwx 3 root root 144 Feb 4 13:17 .
> drwxr-xr-x 24 root root 1200 Feb 4 17:10 ..
> - -rw-r--r-- 1 zope users 0 Feb 4 13:17 a
> drwxr-xr-x 3 zope users 72 Feb 4 13:17
> zopyx.textindexng3-4.0.1-py2.4-linux-x86_64.egg-tmp
>
> Why is setuptools using /root/.python-eggs only for this particular
> module and isn't it using something like /home/zope/.python-eggs
> instead - especially having changed the UID already?
I'll answer the problem, not the question. (I don't think setuptools
should ever write to a user's home directory, whatever the user.)
The easiest way to solve this problem is to use unzipped eggs, which
also import faster in my experience. Buildout now has a global option
(unzip = true) that causes all eggs it installs to be unzipped.
Jim
--
Jim Fulton
Zope Corporation
More information about the Distutils-SIG
mailing list