[Distutils] [issue16] permission error in untarring pyOpenSSL-0.6.tar.gz

Zooko O'Whielacronx setuptools at bugs.python.org
Fri May 30 20:29:22 CEST 2008

New submission from Zooko O'Whielacronx <zooko at zooko.com>:

Running easy_install on pyOpenSSL-0.6.tar.gz ends with:

line 626, in install_eggs
    unpack_archive(dist_filename, tmpdir, self.unpack_progress)
line 67, in unpack_archive
    driver(filename, extract_dir, progress_filter)
line 192, in unpack_tarfile
    tarobj._extract_member(member,dst)  # XXX Ugh
line 1656, in _extract_member
    self.chmod(tarinfo, targetpath)
line 1777, in chmod
    raise ExtractError("could not change mode of %s to mode %o (octal),
exception: %s" % (targetpath, tarinfo.mode, e))
tarfile.ExtractError: could not change mode of
/tmp/easy_install-4yCggq/pyOpenSSL-0.6 to mode 2755 (octal), exception: [Errno
1] Operation not permitted: '/tmp/easy_install-4yCggq/pyOpenSSL-0.6'

If I untar that tarball with GNU tar, I see that there is one file that doesn't
have read permissions for user or group:

-rw-r--r-- martin/martin   1289 2002-09-07 09:28:12
-rw-r--r-- martin/martin   1863 2004-07-22 06:01:25 pyOpenSSL-0.6/examples/proxy.py
-rw------- martin/martin   3508 2002-09-07 09:27:47
-rw-r--r-- martin/martin    260 2004-07-22 06:01:25 pyOpenSSL-0.6/__init__.py

If I rebuild that tarball with GNU tar ("tar czvvf pyOpenSSL-0.6.tar.gz
pyOpenSSL") then the resulting tarball does not have that problem.

So, I don't understand it, but there is something funny in the permissions in
that official pyOpenSSL-0.6.tar.gz (from
http://sourceforge.net/project/showfiles.php?group_id=31249 ) which causes this
exception inside tarfile but which goes away if you unpack and repack the
tarball on Mac OS X using GNU tar v1.14.

This is probably more of a bug in tarfile.py than in setuptools proper, but I
thought I should register this issue on the setuptools tracker so that we can
think of some workaround to deploy before this gets fixed in Python tarfile.py
and everyone in the world upgrades to the new tarfile.py...

messages: 20
nosy: zooko
priority: bug
status: unread
title: permission error in untarring pyOpenSSL-0.6.tar.gz

Setuptools tracker <setuptools at bugs.python.org>

More information about the Distutils-SIG mailing list