[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-tar] get "Cannot unlink: Permission denied" while extracting tar as
From: |
Giuseppe Scrivano |
Subject: |
[Bug-tar] get "Cannot unlink: Permission denied" while extracting tar as non root user |
Date: |
Mon, 13 Nov 2017 17:07:05 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Hi,
I am trying to extract as a non root user, using the options
--no-same-owner --no-same-permissions --delay-directory-restore.
Using the file:
https://registry.access.redhat.com/v2/openshift3/container-engine/blobs/sha256:51d928af4977fea04f07eebf18c2060b66a2cbf4ecc45e9ba892295d95e21ad4
tar fails with this error:
tar: usr/bin/docker-storage-setup: Cannot unlink: Permission denied
tar: usr/lib64/libaio.so.1: Cannot unlink: Permission denied
tar: usr/bin/iptables-xml: Cannot unlink: Permission denied
tar: Exiting with failure status due to previous errors
It seems the parent directory mode is restored too early by
apply_nonancestor_delayed_set_stat(), causing the "unlinkat()" call
placeholder file at line 1734 to fail.
create_placeholder_file checks only for the first element in
`delayed_set_stat_head` before calling `mark_after_links`.
If I change it to iterate over the entire list, then tar completes
successfully. Is it the correct way to solve it?
Thanks,
Giuseppe
- [Bug-tar] get "Cannot unlink: Permission denied" while extracting tar as non root user,
Giuseppe Scrivano <=