Bug 63293 - tar fails to restore symbolic link
Summary: tar fails to restore symbolic link
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: tar
Version: 7.2
Hardware: i586
OS: Linux
Target Milestone: ---
Assignee: wdovlrrw
QA Contact: Ben Levenson
Depends On:
TreeView+ depends on / blocked
Reported: 2002-04-12 04:17 UTC by Steve Dum
Modified: 2007-04-18 16:41 UTC (History)
0 users

Clone Of:
Last Closed: 2002-04-12 04:17:11 UTC

Attachments (Terms of Use)

Description Steve Dum 2002-04-12 04:17:06 UTC
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 08:25:29 UTC
Works with the current tar

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