Bug 11440 - cpio deletes symlinks
cpio deletes symlinks
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: cpio (Show other bugs)
6.2
All Linux
medium Severity medium
: ---
: ---
Assigned To: bero
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-05-16 06:13 EDT by Karsten Hopp
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-10-01 09:01:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Karsten Hopp 2000-05-16 06:13:11 EDT
I tried to transfer a cpio archive from on computer to the other.
Due to space limitations, the second machine had a symlink to
a directory on an other partition. This symlink was replaced by
a directory after unpacking the cpio archive.

Example:
On one computer you have the the following directory structure
which you want to cpoy to the other computer:

drwxr-xr-x    3 root     root         2048 May  5 16:03 ./
drwxrwxrwt    9 root     root        11264 May  5 16:03 ../
drwxr-xr-x    2 root     root         3072 May  5 15:39 test/
drwxr-xr-x    1 root     root         3072 May  5 15:39 test1/

Then create the archive with cpio -oc.

On the other maschine are the following files:
drwxr-xr-x    3 root     root         2048 Apr  5 16:03 ./
drwxrwxrwt    9 root     root        11264 Apr  5 16:03 ../
drwxr-xr-x    2 root     root         3072 Apr  5 15:39 test/
lrwxrwxrwx    1 root     root            4 Apr  5 15:39 test1->/mnt/other/

Unpack the archive  with cpio -ivu or cpio -ivumd.


ls -l:
drwxr-xr-x    3 root     root         2048 May  5 16:03 ./
drwxrwxrwt    9 root     root        11264 May  5 16:03 ../
drwxr-xr-x    2 root     root         3072 May  5 15:39 test/
drwxr-xr-x    1 root     root         3072 May  5 15:39 test1/

I don't think that this is the expected behavior.
Comment 1 Jeff Johnson 2000-07-22 14:36:45 EDT
Verified that solaris2.6 /bin/cpio does not replace symlink with directory.
Comment 2 Jeff Johnson 2000-08-08 12:06:45 EDT
Deferred until after Red Hat 7.0.
Comment 3 Karsten Hopp 2001-02-09 11:55:38 EST
seems to be an glibc problem. Update to glibc-2.2.1-6, and the link wont be 
replaced.

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