From owner-freebsd-arch@FreeBSD.ORG Tue Oct 28 16:55:35 2008 Return-Path: Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A48010656A1 for ; Tue, 28 Oct 2008 16:55:35 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id 4DB8E8FC16 for ; Tue, 28 Oct 2008 16:55:35 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.3/8.14.2) with ESMTP id m9SGItGI045166; Tue, 28 Oct 2008 12:18:55 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.3/8.14.2/Submit) id m9SGIteW045165; Tue, 28 Oct 2008 12:18:55 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Date: Tue, 28 Oct 2008 12:18:55 -0400 From: David Schultz To: Edward Tomasz Napierala Message-ID: <20081028161855.GA45129@zim.MIT.EDU> Mail-Followup-To: Edward Tomasz Napierala , freebsd-arch@FreeBSD.ORG References: <20081027193545.GA95872@pin.if.uz.zgora.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081027193545.GA95872@pin.if.uz.zgora.pl> Cc: freebsd-arch@FreeBSD.ORG Subject: Re: Directory rename semantics. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Oct 2008 16:55:35 -0000 On Mon, Oct 27, 2008, Edward Tomasz Napierala wrote: > Let's say we have two directories, "A/" and "B/". We also have a > file, "A/F". To remove that file, we need write access to "A/". > To move that file to "B/", we need write access to both "A/" and > "B/". Now, assume we have a directory, "A/D". To remove that > directory, we need write access to "A/". To move that directory > to "B/", we need write access to "A/", "B/", _and "A/D"_. > > I'd like to remove the last check (requirement to have write access > to a directory we want to move somewhere else). Reason for this > is that it doesn't seem very logical, and many systems - including > SunOS, and our ZFS - behave differently. In other words, we have > different semantics on UFS and ZFS. No comment on other operating systems or standards, but I wanted to point out that there is some logic to FreeBSD's present behavior: When you move A/D, you must be able to write to D, because you are modifying D's ".." entry to point to B instead of A. >From a practical point of view, I think either behavior is fine, but we should consider whether any security-critical applications rely on the current behavior before changing it.