Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Jun 2006 18:27:25 +0200
From:      "no@spam@mgedv.net" <nospam@mgedv.net>
To:        <freebsd-questions@freebsd.org>
Subject:   mtree(8): bug/compatibility with flags
Message-ID:  <001101c68e3d$17032870$01010101@avalon.lan>

next in thread | raw e-mail | index | archive | help

hi,

played around with mtree to save/restore directory/file
permissions/owner/flags on demand.

current "save" method is:
mtree -c -i -n -x -p $h_dir -k type,flags,mode,uid,gid,link >$h_file;

current "restore" method is:
mtree -U -e -n -q -x -p $h_dir -k type,flags,mode,uid,gid,link <$h_file;

save works perfectly, changing back uids and modes works, too.

the problem: if you do this after you saved the mtree:
chflags schg /any_mtree_file

you have to run the mtree-restore twice, because mtree tries to set
the mode 1st (which fails because of schg), and then removes the schg flags.
so on the 2nd run, the mode would be set, but this is odd ;-)

could it be better if mtree restores the permissions as they are
listed by the keywords?




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001101c68e3d$17032870$01010101>