cpio does not preserve ownership when run as root
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cpio (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
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:/
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: cpio 2.10-1ubuntu2
ProcVersionSign
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
Status changed to 'Confirmed' because the bug affects multiple users.