From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 12 23:37:29 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BF30216A41F for ; Fri, 12 Aug 2005 23:37:29 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6FDDD43D46 for ; Fri, 12 Aug 2005 23:37:29 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id j7CNbSGe022467; Fri, 12 Aug 2005 16:37:28 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j7CNbSjN022466; Fri, 12 Aug 2005 16:37:28 -0700 Date: Fri, 12 Aug 2005 16:37:28 -0700 From: Brooks Davis To: =?iso-8859-1?Q?Jo=E3o?= Carlos Mendes Luis Message-ID: <20050812233728.GA22225@odin.ac.hmc.edu> References: <42FD15EA.8050500@jonny.eng.br> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BOKacYhQ+x31HxR3" Content-Disposition: inline In-Reply-To: <42FD15EA.8050500@jonny.eng.br> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: hackers@freebsd.org Subject: Re: File create permissions, what am I missing? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Aug 2005 23:37:29 -0000 --BOKacYhQ+x31HxR3 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 12, 2005 at 06:34:34PM -0300, Jo=E3o Carlos Mendes Luis wrote: > In a directory with -rwxrwxrwx, any user can create files, but who should= =20 > be the owner/group of this file? >=20 > Long time ago in Unix history, the owner would be the user who created th= e=20 > file, and the group would be the users's primary group. >=20 > Later, IIRC, if the directory group was one of the user's secondary group= s,=20 > the file would also be from this group. >=20 > A later modification defined that a setgid directory would effect in all= =20 > files created belonging to the directory's user. >=20 > Am I correct? >=20 > But I have already tested 3 system, 2 with 5-stable and 1 with 4-stable, = in=20 > which the created file inside a -rwxrwxrwx directory is created belonging= =20 > to the directory's group, WITHOUT the setgid bit. What did I miss? On BSD systems, the group of a file is always the group of the directory it is in. This differs from SysV UNIX. The resident grey-beard at work feels this is a new and annoying behavior. (i.e. it wasn't always this way. :) -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --BOKacYhQ+x31HxR3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFC/TK4XY6L6fI4GtQRAqO+AKCk+gbMNknN7HlHNWllu1EcfVCRZgCeMrA0 h3DIz0Dq9svwqgEC2b2kYsc= =YtZ0 -----END PGP SIGNATURE----- --BOKacYhQ+x31HxR3--