RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
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
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3300 0 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.