From owner-freebsd-questions Fri Oct 12 0:53:35 2001 Delivered-To: freebsd-questions@freebsd.org Received: from cartman.private.techsupport.co.uk (cabletel1.cableol.net [194.168.3.4]) by hub.freebsd.org (Postfix) with ESMTP id DF58A37B431 for ; Fri, 12 Oct 2001 00:53:25 -0700 (PDT) Received: from ceri by cartman.private.techsupport.co.uk with local (Exim 3.31 #1) id 15rx7b-0005bE-00; Fri, 12 Oct 2001 08:52:43 +0100 Date: Fri, 12 Oct 2001 08:52:43 +0100 From: Ceri To: aventure@csf.edu Cc: freebsd-questions@freebsd.org Subject: Re: Copying just the Permissions Message-ID: <20011012085243.B8993@cartman.private.techsupport.co.uk> References: <200110112125.f9BLPKn03698@javalina.csf.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200110112125.f9BLPKn03698@javalina.csf.edu>; from aventure@csf.edu on Thu, Oct 11, 2001 at 03:24:00PM -0600 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Oct 11, 2001 at 03:24:00PM -0600, aventure@csf.edu said: > The situation I am in: I have 2 drives. Drive #1 is continuously > updated by users. Drive #2 contains a an exact copy of the first. > (permissions and all). > > Is it possible to copy JUST the permissions from drive #2 back onto > Drive #1.. > > Someone got into the system and changed a lot of the permissions on > drive #1 and i was hoping there was a faster way to restore them other > than every one by hand. I think mtree(8) is your friend here. Something like : mtree -c -k mode > /tmp/goodspec on the drive with good permissions, and then something like : mtree -U -f /tmp/goodspec on the other drive But Do Not Take My Word For It. Read the manpage yourself and test. I have NEVER directly used mtree, but I do believe it's the tool for your job. Ceri -- Aren't we supposed to hate Darth Maul? Then why doesn't he do anything more evil than defeat one of his opponents in a 2-on-1 fight? --Jon Hall, rec.arts.tv.mst3k.misc To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message