[Distutils] [issue58] find_on_path on systems with tight permissions

Andre Nathan setuptools at bugs.python.org
Mon Feb 2 17:26:54 CET 2009

New submission from Andre Nathan <andrenth at gmail.com>:


I'm using setuptools on a server with tight permissions; a normal user is not
allowed to list the contents of certain directories, including /usr/bin, which
setuptools tries to scan when searching for .egg files. Thus, running any
command installed from setuptools fails with

  OSError: [Errno 13] Permission denied: '/usr/bin'

The following change in find_on_path(), in pkg_resources.py, makes it ignore
directories which it cannot read:

  -if os.path.isdir(path_item):
  +if os.path.isdir(path_item) and os.access(path_item, os.R_OK):

Do you think this could be applied?


messages: 233
nosy: andrenth
priority: bug
status: unread
title: find_on_path on systems with tight permissions

Setuptools tracker <setuptools at bugs.python.org>

More information about the Distutils-SIG mailing list