cpio does not preserve ownership when run as root

Bug #861671 reported by Jim Mercer
10
This bug affects 2 people
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://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

Revision history for this message
Jim Mercer (jmercer-l) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in cpio (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.