From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 13 15:55:23 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 27F5316A41F for ; Sat, 13 Aug 2005 15:55:23 +0000 (GMT) (envelope-from jonny@jonny.eng.br) Received: from coe.ufrj.br (roma.coe.ufrj.br [146.164.53.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 90D7843D45 for ; Sat, 13 Aug 2005 15:55:22 +0000 (GMT) (envelope-from jonny@jonny.eng.br) Received: from localhost (localhost [127.0.0.1]) by coe.ufrj.br (Postfix) with ESMTP id 8A0981771E; Sat, 13 Aug 2005 12:55:21 -0300 (BRT) Received: from coe.ufrj.br ([146.164.53.65]) by localhost (roma.coe.ufrj.br [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 75183-10; Sat, 13 Aug 2005 12:55:15 -0300 (BRT) Received: from [200.216.19.102] (unknown [200.216.19.102]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by coe.ufrj.br (Postfix) with ESMTP id 7FD7B1700E; Sat, 13 Aug 2005 12:55:11 -0300 (BRT) Message-ID: <42FE1781.9050403@jonny.eng.br> Date: Sat, 13 Aug 2005 12:53:37 -0300 From: =?ISO-8859-1?Q?Jo=E3o_Carlos_Mendes_Lu=EDs?= User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Brooks Davis References: <42FD15EA.8050500@jonny.eng.br> <20050812233728.GA22225@odin.ac.hmc.edu> In-Reply-To: <20050812233728.GA22225@odin.ac.hmc.edu> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAADBQ TFRFAAAAgAAAAIAAgIAAAACAgACAAICAgICAwMDA/wAAAP8A//8AAAD//wD/AP//////ex+xxAAA Ac9JREFUOMtdk8FupDAMhr1qRbjR2x77GD3uq7BS1TkuhyrmFnppcvOrUlUquXltJ2EAIw1Dvvz+ bRPgrQbU6NpzuY0AF1LABIc4AH9crxLwb/4VztEU42W9SOBezwX4ClzeLuC9PBFRq+2xpJJHN8KQ Oa9Hd/ACnldgUVADvgHKA2usVwW12BVSkrThJH+5lqqQXIAAvRkQM6WqkADpO5gBx5m5VOxRgBZV HRLRcgc4dv3ukbOBm3de8uHIe1n0BBUBIi4hi0U2ownGkkwrwN425ygVPjntsvOmkFyyXYfreHXq f1tugFLCFDhZcsffYIqxKNAB/FkNbBDslUTz0MMQfuRnkN6D5nLVQ0G2H3bWC6KByTZPZWhJ/jgs ChX3e/P5y0VReCUCYm0/pUQd1lQ4/aIty/YtW6y3WMHc8yazpcU8UuqqB+LfMql/wVx4kXNTwGQO PxTuL7+AhbSkWS4z0TdZFbo1BR6qQkA08DnogNNHey/SGc5GejqFttxhjBHd3rjd62nR08gnxeFr Ic2e52we+QC0rIg6KYn1AKQsbF3wcgAP00MZrZ6X0yc5v5TRXgTi/jtVwef5I6Y+J7kyb+d1eB6K 4LoOLphBW/8PdNW9dapKWXwAAAAASUVORK5CYII= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: amavisd-new at coe.ufrj.br 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: Sat, 13 Aug 2005 15:55:23 -0000 Brooks Davis wrote: > On Fri, Aug 12, 2005 at 06:34:34PM -0300, Joćo Carlos Mendes Luis wrote: > >>In a directory with -rwxrwxrwx, any user can create files, but who should >>be the owner/group of this file? >> >>Long time ago in Unix history, the owner would be the user who created the >>file, and the group would be the users's primary group. >> >>Later, IIRC, if the directory group was one of the user's secondary groups, >>the file would also be from this group. >> >>A later modification defined that a setgid directory would effect in all >>files created belonging to the directory's user. >> >>Am I correct? >> >>But I have already tested 3 system, 2 with 5-stable and 1 with 4-stable, in >>which the created file inside a -rwxrwxrwx directory is created belonging >>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. :) So this is expected behavior? Isn't this someway insecure?