From owner-freebsd-hackers Thu Oct 28 3:30:16 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from citadel.cequrux.com (citadel.cdsec.com [192.96.22.18]) by hub.freebsd.org (Postfix) with ESMTP id AB15314CF1 for ; Thu, 28 Oct 1999 03:30:02 -0700 (PDT) (envelope-from gram@cequrux.com) Received: (from nobody@localhost) by citadel.cequrux.com (8.9.3/8.9.3) id MAA29829 for ; Thu, 28 Oct 1999 12:30:00 +0200 (SAST) Received: by citadel.cequrux.com via recvmail id 29823; Thu Oct 28 12:29:51 1999 From: Graham Wheeler To: hackers@freebsd.org Subject: Re: Weird /tmp behaviour Date: Thu, 28 Oct 1999 12:23:35 +0200 X-Mailer: KMail [version 1.0.28] Content-Type: text/plain References: <99102811072904.03657@cequrux.com> <19991028112331.A11345@cequrux.com> In-Reply-To: <19991028112331.A11345@cequrux.com> MIME-Version: 1.0 Message-Id: <99102812260305.03657@cequrux.com> Content-Transfer-Encoding: 8bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 28 Oct 1999, you wrote: > On Thu, Oct 28, 1999 at 11:06:14AM +0200, Graham Wheeler wrote: > > Hi all > > > > We've just noticed something strange here, that probably has a mundane > > explanation but we can't figure it out. On a 2.2.8 FreeBSD system, if anyone > > creates a file in /tmp, the group gets set to `bin'. The SGID bit is not set, > > so that doesn't explain it. Does anyone know why this happens? Unfortunately > > I don't have immediate access to any other releases to see if it is > > release-specific. > > > That's what BSD just does - see open(2): > > When a new file is created it is given the group of the directory which > contains it. That's pretty weird (but quite correct). Just checked on NetBSD and found the same. I would have expected this behaviour only if the SGID bit was set, not by default. Ah, well, live and learn (and use chown()); -- Dr Graham Wheeler E-mail: gram@cequrux.com Cequrux Technologies Phone: +27(21)423-6065/6/7 Firewalls/Virtual Private Networks Fax: +27(21)24-3656 Data/Network Security Specialists WWW: http://www.cequrux.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message