bin/85439: bsdtar doesn't restore file flags (cpio also doesn't)

Harald Schmalzbauer harry at
Mon Aug 29 15:00:23 GMT 2005

>Number:         85439
>Category:       bin
>Synopsis:       bsdtar doesn't restore file flags (cpio also doesn't)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 29 15:00:22 GMT 2005
>Originator:     Harald Schmalzbauer
>Release:        FreeBSD 6.0-BETA2 i386
System: FreeBSD 6.0-BETA2 FreeBSD 6.0-BETA2 #0: Thu Aug 18 05:29:38 CEST 2005 root@:/usr/obj/usr/src/sys/CALE i386

	Short description says it all, I'm llosing file flags when restoring
	tar archive.
mtree -U -p /mnt/ -f /etc/mtree/BIND.chroot.dist
set testflags = 'arch opaque nodump sappnd schg sunlnk uappnd uchg uunlnk'
foreach flag ( $testflags )
echo "This file should have flag $flag set" > /mnt/etc/testfile.$flag
chflags $flag /mnt/etc/testfile.$flag
tar -C /mnt -cvf /mnt/.flagstest.tar etc
foreach flag ( $testflags )
# Don't care about the nonodump error
chflags no$flag /mnt/etc/testfile.$flag
rm -R /mnt/*
tar -C /mnt -xvpf /mnt/.flagstest.tar

Now you can see all files are there, also mtime is correctly restored, but
no flags.




More information about the freebsd-bugs mailing list