New submission from Nicholas Patterson <nicholas_patter...@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 <rep...@bugs.python.org> <http://bugs.python.org/issue5151> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com