Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tarfile.py incurs exception from self.chmod() when tarball has g+s #47266

Closed
zooko mannequin opened this issue May 30, 2008 · 3 comments
Closed

tarfile.py incurs exception from self.chmod() when tarball has g+s #47266

zooko mannequin opened this issue May 30, 2008 · 3 comments
Assignees
Labels
type-bug An unexpected behavior, bug, or error

Comments

@zooko
Copy link
Mannequin

zooko mannequin commented May 30, 2008

BPO 3016
Nosy @loewis, @gustaebel

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/gustaebel'
closed_at = <Date 2008-05-31.11:06:54.720>
created_at = <Date 2008-05-30.22:54:51.926>
labels = ['type-bug']
title = 'tarfile.py incurs exception from self.chmod() when tarball has g+s'
updated_at = <Date 2008-05-31.11:06:54.718>
user = 'https://bugs.python.org/zooko'

bugs.python.org fields:

activity = <Date 2008-05-31.11:06:54.718>
actor = 'lars.gustaebel'
assignee = 'lars.gustaebel'
closed = True
closed_date = <Date 2008-05-31.11:06:54.720>
closer = 'lars.gustaebel'
components = []
creation = <Date 2008-05-30.22:54:51.926>
creator = 'zooko'
dependencies = []
files = []
hgrepos = []
issue_num = 3016
keywords = []
message_count = 3.0
messages = ['67563', '67568', '67574']
nosy_count = 3.0
nosy_names = ['loewis', 'zooko', 'lars.gustaebel']
pr_nums = []
priority = 'normal'
resolution = 'works for me'
stage = None
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue3016'
versions = []

@zooko
Copy link
Mannequin Author

zooko mannequin commented May 30, 2008

As reported at https://bugs.launchpad.net/pyopenssl/+bug/236190 ,
tarfile.py incurs an "Operation not permitted" exception (on Mac OS
10.4) when it tries to untar the pyOpenSSL-0.6.tar.gz tarball, because
that tarball has directories in it marked as having the "g+s" bit.

(Why this leads to an "Operation not permitted" exception, I don't know.)

@zooko zooko mannequin added the type-bug An unexpected behavior, bug, or error label May 30, 2008
@loewis
Copy link
Mannequin

loewis mannequin commented May 31, 2008

I can't reproduce this. If I do

py> import tarfile
py> t=tarfile.open("pyOpenSSL-0.6.tar.gz","r:*")
py> t.extractall()
py>

it extracts just fine, and sets the s-bits. I've used the file at

http://downloads.sourceforge.net/pyopenssl/pyOpenSSL-0.6.tar.gz?modtime=1092355200&big_mirror=0

@loewis loewis mannequin assigned gustaebel May 31, 2008
@gustaebel
Copy link
Mannequin

gustaebel mannequin commented May 31, 2008

With some effort I could reproduce the problem (on a FAT32 filesystem),
but what we have here is clearly a usage problem. In unpack_tarfile() in
setuptools/archive_util.py TarFile's internal _extract_member() method
is used to extract the contents. For every non-fatal error (like a
failing chmod()) _extract_member() raises an ExtractError exception. In
TarFile.extract() these ExtractErrors are normally ignored. The
unpack_tarfile() function in setuptools needs some fixing, it should
either act more like TarFile.extract() or better use the public API.

@gustaebel gustaebel mannequin closed this as completed May 31, 2008
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

0 participants