New submission from Charles Coulombe <charles.coulo...@calculquebec.ca>:

An archive that does not have sgid that is extracted in a directory with sgid 
set does not end up having its sgid set since the targetpath is chmod with the 
mode of the tarinfo. (Lib/tarfile.py#L2277) 

For comparison, an archive extracted with tar has the sgid bit set.

I added a patch as attachment to gather comments before making this PR.

----------
components: Library (Lib)
files: tarfile_sgid.patch
keywords: patch
messages: 353305
nosy: Charles Coulombe
priority: normal
severity: normal
status: open
title: tarfile forgets set sgid when targetpath has it
type: behavior
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7
Added file: https://bugs.python.org/file48626/tarfile_sgid.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38286>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to