bug-cpio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-cpio] find -depth directories still owned by root


From: jidanni
Subject: [Bug-cpio] find -depth directories still owned by root
Date: Sun, 24 Feb 2008 06:32:16 +0800

I have found a bug with cpio 2.9 that affects archives made with find
-depth and extracted by root.

Archives not made with -depth are not affected.

The owner is not properly changed on directories.

$ mkdir A
$ touch A/B
$ find A -depth|cpio -oF Q
1 block
$ cpio -tvF Q
-rw-r--r--   1 1000     1000            0 Feb 24 06:14 A/B
drwxr-xr-x   2 1000     1000            0 Feb 24 06:14 A
1 block
$ rm -r A
$ su
Password:
# cpio -idvmF Q
A/B
A
1 block
# find A -ls
 10457    0 drwxr-xr-x   2 root     root           60 Feb 24 06:19 A
 10458    0 -rw-r--r--   1 jidanni  jidanni         0 Feb 24 06:14 A/B
# rm -r A
# cpio -idF Q
1 block
# find A -ls
 10466    0 drwxr-xr-x   2 root     root           60 Feb 24 06:20 A
 10467    0 -rw-r--r--   1 jidanni  jidanni         0 Feb 24 06:20 A/B

If -depth was not used, the problem does not occur.

P.S., this example is the manual
     % find . -print -depth | cpio -ov > tree.cpio
will get a warning: find: warning: you have specified the -depth...




reply via email to

[Prev in Thread] Current Thread [Next in Thread]