Issue 314: Permission denied on python-eggs folder
Status:  New
Owner: ----
Reported by cyborg10...@gmail.com, Mar 28, 2013
I've written a script, using pyodbc, that's used by multiple users.  The problem is that when the ~/.python-eggs folder is created at run-time, the permissions are not correct:

drw-rw-r--  2 joe users  4.0K Mar 28 09:34 .python-eggs/

Directories need to have execution permissions.  This cases this error:

  import pyodbc
  File "build/bdist.linux-x86_64/egg/pyodbc.py", line 7, in <module>
  File "build/bdist.linux-x86_64/egg/pyodbc.py", line 4, in __bootstrap__
  File "/software/Python/272/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 882, in resource_filename
    )
  File "/software/Python/272/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1351, in get_resource_filename
    last = self._extract_resource(
  File "/software/Python/272/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1406, in _extract_resource
    
  File "/software/Python/272/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 928, in extraction_error
    
pkg_resources.ExtractionError: Can't extract file(s) to egg cache

The following error occurred while trying to extract file(s) to the Python egg
cache:

  [Errno 13] Permission denied: '/home/joe/.python-eggs/pyodbc-3.0.6-py2.7-linux-x86_64.egg-tmp/tmpAu8lcr.$extract'

The Python egg cache directory is currently set to:

  /home/joe/.python-eggs

Perhaps your account does not have write access to this directory?  You can
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory.

I've seen a similar issue logged before, but it was 3 years ago, so have raised a new one.

Mar 28, 2013
#1 cyborg10...@gmail.com
Just to add, if I `chmod -R 770` the directory, I can use the tool fine.  It's just annoying that I'd have to do this for every user.  I've also checked the permissions in Python's site-packages and there doesn't appear to be a problem (all 775).
Jun 11, 2014
#2 marcelhe...@gmail.com
I ran into the same problem. Has it been solved yet?
Jun 11, 2014
#4 cyborg10...@gmail.com
Don't think so!  I moved to pypyodbc.
Jun 11, 2014
#5 marcelhe...@gmail.com
OK, going to take a look at pypyodbc