From owner-freebsd-questions@FreeBSD.ORG Fri Feb 8 11:28:58 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3B3D16A418 for ; Fri, 8 Feb 2008 11:28:58 +0000 (UTC) (envelope-from wouter@fizzyflux.nl) Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.184]) by mx1.freebsd.org (Postfix) with ESMTP id 83EDC13C4E1 for ; Fri, 8 Feb 2008 11:28:58 +0000 (UTC) (envelope-from wouter@fizzyflux.nl) Received: by rv-out-0910.google.com with SMTP id g13so2785742rvb.43 for ; Fri, 08 Feb 2008 03:28:58 -0800 (PST) Received: by 10.141.88.3 with SMTP id q3mr8414342rvl.94.1202470137967; Fri, 08 Feb 2008 03:28:57 -0800 (PST) Received: by 10.141.179.16 with HTTP; Fri, 8 Feb 2008 03:28:57 -0800 (PST) Message-ID: Date: Fri, 8 Feb 2008 12:28:57 +0100 From: "Wouter Oosterveld" To: "Pietro Cerutti" , freebsd-questions@freebsd.org In-Reply-To: <47AC2018.6010403@gahr.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <47AC2018.6010403@gahr.ch> Cc: Subject: Re: rename and chmod (was: cp -p) 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: Fri, 08 Feb 2008 11:28:58 -0000 >Now, from a logical point of view, why moving a file into a directory doesn't fall into the "created into them" case? Because (if on the same filesystem) you don't create a new file. You just link the file in the destination dir and unlink the file from the source dir. Regards, Wouter 2008/2/8, Pietro Cerutti : > Ok, my view is getting clearer ;-) > > > my problem in understanding the semantics of mv, cp -p and the rename(2) > function seems to be related to the terminology used in chmod(1) man page. > > This is the explanation of setuid (the same holds for setgid): > > "Directories with this bit set will force all files and subdirectories > created in them to be owned by the directory owner and not by the uid of > the creating process, if the underlying file system supports this feature" > > Now, from a logical point of view, why moving a file into a directory > doesn't fall into the "created into them" case? > > > -- > Pietro Cerutti > > PGP Public Key: > http://gahr.ch/pgp > > > -- [ wouter@berenboot.xs4all.nl is binnenkort niet meer, wouter@fizzyflux.nl is mijn nieuwe email-adres. ]