Mailing List Archive

[issue5151] extractall method for TarFile objects not setting owner:group on directories
New submission from Nicholas Patterson <nicholas_patterson@agilent.com>:

Used the TarFile object to create a bzip2 compressed tar file (seems to
have worked fine). Then used the extractall method to restore the
archive in a new location. All the files appear to have the same
permissions and owner:group as before, but most of the directories
('state' is only exception) have different permissions and the
owner:group are set to the UID that was running the script in this case
root:root.

Partial original location listing
/opt/fallback> ls -l /opt/agilent/ipcore/02.01/config
total 112
drwxrwxrwx 2 agilent agilent 4096 Feb 3 14:07 dist
-rwxrwxrwx 1 agilent agilent 208 Feb 3 14:07 hostnameCache.xml
-rwxrwxrwx 1 agilent agilent 1000 Feb 3 14:07 hostnamecache.xsd
drwxr-xr-x 4 agilent agilent 4096 Feb 3 14:08 inuse
-rwxrwxrwx 1 agilent agilent 4019 Feb 3 14:07 log4cxx.properties
-rwxrwxrwx 1 agilent agilent 9437 Feb 3 14:07 log4cxx.xml_template
drwxrwxrwx 3 agilent agilent 4096 Feb 3 14:07 mebs
-rwxrwxrwx 1 agilent agilent 4283 Feb 3 14:07 protocol.xml
-rwxrwxrwx 1 agilent agilent 8339 Feb 3 14:07 registry.ini
drwxrwxrwx 2 agilent agilent 4096 Feb 3 14:07 state
-rwxrwxrwx 1 agilent agilent 886 Feb 3 14:07 trunknamecache.xsd

Partial new location listing
/opt/fallback> ll config
total 120
drwxr-xr-x 6 root root 4096 Feb 3 16:38 ./
drwxrwxr-x 8 agilent agilent 4096 Feb 3 16:38 ../
drwxr-xr-x 2 root root 4096 Feb 3 16:38 dist/
-rwxrwxrwx 1 agilent agilent 208 Feb 3 14:07 hostnameCache.xml*
-rwxrwxrwx 1 agilent agilent 1000 Feb 3 14:07 hostnamecache.xsd*
drwxr-xr-x 4 root root 4096 Feb 3 16:38 inuse/
-rwxrwxrwx 1 agilent agilent 4019 Feb 3 14:07 log4cxx.properties*
-rwxrwxrwx 1 agilent agilent 9437 Feb 3 14:07 log4cxx.xml_template*
drwxr-xr-x 3 root root 4096 Feb 3 16:38 mebs/
-rwxrwxrwx 1 agilent agilent 4283 Feb 3 14:07 protocol.xml*
-rwxrwxrwx 1 agilent agilent 8339 Feb 3 14:07 registry.ini*
drwxrwxrwx 2 agilent agilent 4096 Feb 3 14:07 state/

----------
components: None
messages: 81143
nosy: npatters
severity: normal
status: open
title: extractall method for TarFile objects not setting owner:group on directories
type: behavior
versions: Python 2.5

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue5151>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue5151] extractall method for TarFile objects not setting owner:group on directories [ In reply to ]
Martin v. Löwis <martin@v.loewis.de> added the comment:

Does the problem exist in 2.6 still? If you can't determine that easily,
can you please provide a reproducible test case (e.g. some tar(1)
created tar file plus a Python script)

----------
nosy: +loewis

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue5151>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue5151] extractall method for TarFile objects not setting owner:group on directories [ In reply to ]
Lars Gustäbel <lars@gustaebel.de> added the comment:

This is probably a duplicate of issue1735, which was fixed in r59713,
i.e. between 2.5.1 and 2.5.2. Are you by any chance using Python 2.5.1?

----------
assignee: -> lars.gustaebel
nosy: +lars.gustaebel

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue5151>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue5151] extractall method for TarFile objects not setting owner:group on directories [ In reply to ]
Nicholas Patterson <nicholas_patterson@agilent.com> added the comment:

Using 2.5.0 on SLES 10 servers and 2.5.1 on Solaris 10 servers. Have only tested SLES so far since that's our main platform.

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue5151>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue5151] extractall method for TarFile objects not setting owner:group on directories [ In reply to ]
Lars Gustäbel <lars@gustaebel.de> added the comment:

Could you try to do a test with the patch from issue1735? It is rather
trivial to apply.

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue5151>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue5151] extractall method for TarFile objects not setting owner:group on directories [ In reply to ]
Nicholas Patterson <nicholas_patterson@agilent.com> added the comment:

Yep that fixed it, sorry to have used up your time. Still a bit new to the search feature on the site, didn't notice the form defaulted to only searching on open bugs/issues.

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue5151>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue5151] extractall method for TarFile objects not setting owner:group on directories [ In reply to ]
Lars Gustäbel <lars@gustaebel.de> added the comment:

Never mind! Thank you anyway for your report.

----------
resolution: -> duplicate
status: open -> closed

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue5151>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com