Re: mtree acl support

看板FB_current作者時間12年前 (2014/01/17 13:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串7/7 (看更多)
On Jan 16, 2014, at 12:36 PM, Mark Felder <feld@freebsd.org> wrote: > On Wed, Jan 15, 2014, at 23:11, Tim Kientzle wrote: >> = >> On Jan 14, 2014, at 6:47 AM, Mark Felder <feld@freebsd.org> wrote: >> = >>> I was recently talking to someone about how one would backup / restore >>> ACLs reliably. I didn't see any mention of ACLs in the mtree man page >>> and after a quick google I came upon this old mailing list post: >>> = >>> http://lists.freebsd.org/pipermail/freebsd-hackers/2008-April/024173.ht= ml >>> = >>> patch in list is here: http://heka.cenkes.org/sat/diffs/mtree_acl.diff >>> I've mirrored it here: https://feld.me/freebsd/mtree_acl.diff >>> = >>> This old patch appears to still apply cleanly. I hate to see a patch die >>> and be forgotten. >> = >> One problem that =91tar=92 has addressed (inspired by Joerg Schilling=92s >> work on star) is to permit ACLs to be restored even if the user database >> is out of date. >> = >> This is done by including a fourth field in each ACE with the >> numeric user ID. >> = >> I suspect you want to do the same for mtree. I thought >> I remembered acl_to_text having an option to use >> an extended text format, so it might be a trivial change. >> = > = > As long as it's not default. One of the most convenient ways to change a > user's UID (or multiple users!) is to do an mtree backup, change > UID/GID, and then re-apply mtree backup. Every file that the user(s) > previously owned will be automatically changed to the new UID/GID for > you :-) The extended format stores both name and numeric ID. It tries to restore by name first (looking up as necessary), then falls bac= k on ID if that fails. So this does correctly handle your case. This also lets you restore trees when user lookups are unavailable. For ex= ample, user lookups may be broken because of permission problems that you= =92re trying to fix with mtree. ;-) Tim _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1IsBaEXN (FB_current)
文章代碼(AID): #1IsBaEXN (FB_current)