[Distutils] real vs effective user id
Phillip J. Eby
pje at telecommunity.com
Mon Jun 11 19:57:38 CEST 2007
At 07:12 PM 6/11/2007 +0200, Jerome Alet wrote:
>Hi there,
>
>I've got an application which runs as root
>
>This application calls seteuid to execute part of its code as a lower
>priviledged user temporarily.
>
>after the seteuid call, the MySQLdb module is imported, which was installed
>with setuptools 0.6c6.
>
>then setuptools tries to play with root's .python-eggs directory instead
>of ~effective_user/.python-eggs/, because of the way os.path.expanduser()
>works (line 1039 in pkg_resource.py)
In these types of situations, it's best to set the PYTHON_EGG_CACHE
path explicitly, either via the environment variable or code.
More information about the Distutils-SIG
mailing list