tmolomby / pyodbc

Automatically exported from code.google.com/p/pyodbc
MIT No Attribution
0 stars 0 forks source link

Permission denied on python-eggs folder #314

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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.

Original issue reported on code.google.com by cyborg10...@gmail.com on 28 Mar 2013 at 9:43

GoogleCodeExporter commented 9 years ago
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).

Original comment by cyborg10...@gmail.com on 28 Mar 2013 at 9:45

GoogleCodeExporter commented 9 years ago
I ran into the same problem. Has it been solved yet?

Original comment by marcelhe...@gmail.com on 11 Jun 2014 at 12:55

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Don't think so!  I moved to pypyodbc.

Original comment by cyborg10...@gmail.com on 11 Jun 2014 at 1:06

GoogleCodeExporter commented 9 years ago
OK, going to take a look at pypyodbc

Original comment by marcelhe...@gmail.com on 11 Jun 2014 at 1:22