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
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: tar
Version: 7.4
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Pavel Raiskup
QA Contact: Vaclav Danek
Depends On:
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:
Last Closed: 2018-10-30 11:44:28 UTC
Target Upstream Version:

Attachments (Terms of Use)

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:


Steps to Reproduce:
1. mkdir test; cd test; wget -O t.tar
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:

Fixed upstream by:

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.

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