Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1513946 - tar doesn't honor --delay-directory-restore in all cases
Summary: tar doesn't honor --delay-directory-restore in all cases
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: tar
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Pavel Raiskup
QA Contact: Vaclav Danek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-16 10:43 UTC by Giuseppe Scrivano
Modified: 2018-10-30 11:44 UTC (History)
2 users (show)

Fixed In Version: tar-1.26-35
Doc Type: Bug Fix
Doc Text:
Cause: Tar --delay-directory-restore option improperly handles the stack of directories to be extracted. Consequence: Because some directory permissions are extracted too early, tar fails to extract subsequent files in such directories. Fix: Tar has been fixed so the delayed directories are extracted in correct order. Result: Tar --delay-directory-restore extracts both the directories and subsequent files correctly.
Clone Of:
Environment:
Last Closed: 2018-10-30 11:44:28 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3300 None None None 2018-10-30 11:44:31 UTC

Description Giuseppe Scrivano 2017-11-16 10:43:59 UTC
Description of problem:

tar fails to extract some tarballs as non root user when some directories have no write permission.  GNU tar makes some wrong assumptions on the ordering of the files included in the tarball and sometimes the permissions for the directories are restored too early.

How reproducible:

always


Steps to Reproduce:
1. mkdir test; cd test; wget -O t.tar https://registry.access.redhat.com/v2/openshift3/container-engine/blobs/sha256:51d928af4977fea04f07eebf18c2060b66a2cbf4ecc45e9ba892295d95e21ad4
2. tar --no-same-owner --no-same-permissions --delay-directory-restore -xf a.tar

Actual results:

some permissions are restored too early and tar fails.

Expected results:

tar extracts all the files and restore directories permissions afterwards

Additional info:

Upstream bug report:

http://lists.gnu.org/archive/html/bug-tar/2017-11/msg00009.html

Fixed upstream by:

http://git.savannah.gnu.org/cgit/tar.git/commit/?id=3ae075a51a6c20032a8908615d014e07b750c069

Comment 7 errata-xmlrpc 2018-10-30 11:44:28 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3300


Note You need to log in before you can comment on or make changes to this bug.