Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 258863

Summary: cpio does not preserve directory time stamps and pernissions
Product: Gentoo Linux Reporter: Thomas <tg42>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: High    
Version: 2008.0   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Thomas 2009-02-13 17:15:50 UTC
Similar to bug 222955, the current cpio 2.9-r2 does not preserve directory permissions, if find -depth is used and the directory is not empty.

How to reproduce (as root):

# mkdir -p foo/d755 foo/d755-empty
# chmod 755 foo/d755*
# touch foo/d755/f644
# chmod 644 foo/d755/f644
# umask 027 (alternatively umask 0)
# find foo -depth | cpio -pmd /tmp
# ls -la /tmp/foo

/tmp/foo and /tmp/foo/d755 have permission 0750 (or 777 when run with umask 0)
/tmp/foo and /tmp/foo/d755 have current time stamps

When run without the -depth parameter, the permissions are correct, but the time stamps are not.

Expected result:

foo/d755 should have permission 0755
/tmp/foo and /tmp/foo/d755 should have the timestamps of the original directories.
Comment 1 SpanKY gentoo-dev 2009-02-14 00:36:12 UTC

*** This bug has been marked as a duplicate of bug 222955 ***