From owner-freebsd-questions@FreeBSD.ORG Mon Jun 12 16:27:24 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9579A16A46F for ; Mon, 12 Jun 2006 16:27:24 +0000 (UTC) (envelope-from nospam@mgedv.net) Received: from mail.mgedv.net (mail.mgedv.net [81.223.168.230]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6305043D70 for ; Mon, 12 Jun 2006 16:27:22 +0000 (GMT) (envelope-from nospam@mgedv.net) Received: from metis (sslint.my.loop [1.1.1.1]) by mail.my.loop (mgedv) with ESMTP id 44EAC45791 for ; Mon, 12 Jun 2006 18:27:21 +0200 (CEST) From: "no@spam@mgedv.net" To: Date: Mon, 12 Jun 2006 18:27:25 +0200 Message-ID: <001101c68e3d$17032870$01010101@avalon.lan> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Thread-Index: AcaOPRYUCQMv75aMSlCeiW6xGUwUqg== Subject: mtree(8): bug/compatibility with flags X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jun 2006 16:27:24 -0000 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?