Bug 63293 - tar fails to restore symbolic link
tar fails to restore symbolic link
Product: Red Hat Linux
Classification: Retired
Component: tar (Show other bugs)
i586 Linux
medium Severity medium
: ---
: ---
Assigned To: wdovlrrw
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2002-04-12 00:17 EDT by Steve Dum
Modified: 2007-04-18 12:41 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-04-12 00:17:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Steve Dum 2002-04-12 00:17:06 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020314

Description of problem:
if a directory contains a symbolic link, with other files, and
directory is mode 555 extraction fails.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Run the following script:

mkdir a
mkdir a/b
echo file1 > a/b/file1
ln -s file1 a/b/file2
chmod 444 a/b/file?
chmod 555 a/b
(cd a; tar cf - b) | tar xvf -

results with 

Actual Results:  tar: b/file2: Cannot unlink: Permission denied
tar: Error exit delayed from previous errors

Additional info:

This works on Redhat 6.0, 7.0, fails on 7.1, 7.2 (and it looks like 7.3)  It
seems tar is now 'smarter" in old tar it printed diagnostic
tar: Added write and execute permission to directory b
now tar makes directory writable, writes files it needs to and 
then fixes permissions on directory as required -- only it seems to
not do this for a symbolic link.

Also, if directory only contains a single symbolic link it seems to 
work ok.
Comment 1 Bernhard Rosenkraenzer 2002-04-12 04:25:29 EDT
Works with the current tar

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