This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author srid
Recipients srid
Date 2009-06-04.21:45:50
SpamBayes Score 0.0041510276
Marked as misclassified No
Message-id <1244151952.15.0.48823803395.issue6196@psf.upfronthosting.co.za>
In-reply-to
Content
If a tarball has a-x perms set on its root directory, one cannot access
its contents. 

$ tar zxf generator_tools-0.3.5.tar.gz.
$ ls generator_tools-0.3.5/
ls: cannot access generator_tools-0.3.5/README.txt: Permission denied
...
sridharr@double:/tmp/i$ 

This is fine for GNU tar (the user can always do a chmod +x later). But
for the tarfile library, it would be better to have a flag such as
readaccess=True that will force ``extractall`` to enforce *minimum*
permissions required for the basic read access. This means, tarfile
would ignore u-x on directories and u-r on files.

The reason I make this feature request (instead of working around the
issue myself in a verbose way) is that the very reason to write a
program to extract tarball (instead of doing it manually) is to automate
it .. which automation is more effective and simple if ``extractall``
had a flag such as readaccess=True.
History
Date User Action Args
2009-06-04 21:45:52sridsetrecipients: + srid
2009-06-04 21:45:52sridsetmessageid: <1244151952.15.0.48823803395.issue6196@psf.upfronthosting.co.za>
2009-06-04 21:45:51sridlinkissue6196 messages
2009-06-04 21:45:50sridcreate