[New-bugs-announce] [issue23193] Please support "numeric_owner" in tarfile

Michael Vogt report at bugs.python.org
Thu Jan 8 15:42:24 CET 2015


New submission from Michael Vogt:

Please consider adding a option to extract a tarfile with the uid/gid instead of the lookup for uname/gname in the tarheader (i.e. what tar --numeric-owner provides).

One use-case is if you unpack a chroot tarfile that contains a /etc/{passwd,group} file with different uid/gid for user/groups like zope that may be present in both host and chroot but have different numbers. With the current approach files owned by this user will get the host uid/gid instead of the uid/gid of the chroot.

Attached is a patch to outline what I have in mind - if there is a chance that this patch goes in I'm happy to write the required test (mocking os.chown()) for this to go in.

Thanks for your consideration,
 Michael

----------
components: Library (Lib)
files: tarfile-numeric-owner.diff
keywords: patch
messages: 233663
nosy: mvo
priority: normal
severity: normal
status: open
title: Please support "numeric_owner" in tarfile
type: enhancement
Added file: http://bugs.python.org/file37645/tarfile-numeric-owner.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23193>
_______________________________________


More information about the New-bugs-announce mailing list