From owner-freebsd-questions@FreeBSD.ORG Thu May 31 18:41:02 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A111216A400 for ; Thu, 31 May 2007 18:41:02 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.187.76.162]) by mx1.freebsd.org (Postfix) with ESMTP id 0653A13C46C for ; Thu, 31 May 2007 18:41:01 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from lack-of-gravitas.thebunker.net (gateway.ash.thebunker.net [213.129.64.4]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.1/8.14.1) with ESMTP id l4VIeW4d044955 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 31 May 2007 19:40:46 +0100 (BST) (envelope-from m.seaman@infracaninophile.co.uk) Authentication-Results: smtp.infracaninophile.co.uk from=m.seaman@infracaninophile.co.uk; sender-id=permerror; spf=permerror X-SenderID: Sendmail Sender-ID Filter v0.2.14 smtp.infracaninophile.co.uk l4VIeW4d044955 Message-ID: <465F169F.8090501@infracaninophile.co.uk> Date: Thu, 31 May 2007 19:40:31 +0100 From: Matthew Seaman Organization: Infracaninophile User-Agent: Thunderbird 2.0.0.0 (X11/20070522) MIME-Version: 1.0 To: Patrick Dung References: <200241.77528.qm@web54307.mail.re2.yahoo.com> In-Reply-To: <200241.77528.qm@web54307.mail.re2.yahoo.com> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-3.0 (smtp.infracaninophile.co.uk [81.187.76.162]); Thu, 31 May 2007 19:40:56 +0100 (BST) X-Virus-Scanned: ClamAV 0.90.2/3335/Thu May 31 11:16:21 2007 on happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00, DKIM_POLICY_TESTING,DK_POLICY_SIGNSOME autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on happy-idiot-talk.infracaninophile.co.uk Cc: freebsd-questions@freebsd.org Subject: Re: Question about the difference of with and without SGID on directory 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: Thu, 31 May 2007 18:41:02 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160 Patrick Dung wrote: > Hi > > I found Free/Net/OpenBSD semantic is different from Linux/Solaris. > > Suppose there is a directory called 'directory, > With owner www, and group www and permission 0777. > > Then I touch a file: > $ touch file > $ ls -la > total 4 > drwxrwxrwx 2 www www 512 May 31 17:14 . > drwxrwxrwt 8 root wheel 512 May 31 17:14 .. > -rw-r--r-- 1 patrick www 0 May 31 17:14 file > ^^^ > The file created will have a group owner of the owner of the directory > not the creator. > > So I have two questions here: > 1. So is there a difference with SGID on directory? No. BSDish behaviour of a directory with either mode drwxr-xr-x or drwxr-sr-x is essentially identical to SysV/Linux-ish behaviour with a directory mode drwxr-sr-x > 2. Any idea about why it is different from SYSV (Linux/Solaris)? It's historic. BSD has always worked that way and SysV has begged to differ. Cheers, Matthew - -- Dr Matthew J Seaman MA, D.Phil. Flat 3 7 Priory Courtyard PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW, UK -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.3 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGXxaf3jDkPpsZ+VYRA+RtAJ90NGhTKUxHIY79zGIMdyYq0mzJjgCgjLKf 4t1RvGp9AyaUWLohlA52Qxc= =XJEv -----END PGP SIGNATURE-----