Public bug reported:

when copying files, as root,  with the traditional incantation: find srcdir 
-depth -print | cpio -pdamuv /destdir
the ubuntu version of GNU cpio does not preserve the ownerships of the 
files/directories.

it acts as if --no=preserve-owner was specified.

testing on CentOS, which also uses GNU cpio, does preserve the ownership, when 
running as root.
also, when the same test is running using the package 'bsdcpio', ownership is 
preserved as expected.

this could be a flaw in how GNU cpio is determining "running as root".

this issue would make cpio effectively useless for restoring backups, as
all ownership data is lost when the files are extracted.

this could be related to:
https://bugs.launchpad.net/ubuntu/+source/cpio/+bug/695299

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: cpio 2.10-1ubuntu2
ProcVersionSignature: Ubuntu 2.6.32-24.43-server 2.6.32.15+drm33.5
Uname: Linux 2.6.32-24-server x86_64
Architecture: amd64
Date: Wed Sep 28 14:25:06 2011
InstallationMedia: Ubuntu-Server 10.04.1 LTS "Lucid Lynx" - Release amd64 
(20100816.2)
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, no user)
 LANG=en_US.UTF-8
SourcePackage: cpio

** Affects: cpio (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug lucid

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/861671

Title:
  cpio does not preserve ownership when run as root

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cpio/+bug/861671/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to