From owner-freebsd-security Sat Mar 23 15:14: 3 2002 Delivered-To: freebsd-security@freebsd.org Received: from pumaman.dyndns.org (rl179.isis.de [195.158.146.179]) by hub.freebsd.org (Postfix) with ESMTP id 62F6B37B419 for ; Sat, 23 Mar 2002 15:13:59 -0800 (PST) Received: from ws.bnet ([192.168.100.222] helo=there) by pumaman.dyndns.org with smtp (Exim 3.34 #1) id 16ouhu-000HZ0-00; Sun, 24 Mar 2002 00:13:54 +0100 Content-Type: text/plain; charset="iso-8859-1" From: Bjoern Engels To: Steve Shorter Subject: Re: strange behaviour on /tmp Date: Sun, 24 Mar 2002 00:13:53 +0100 X-Mailer: KMail [version 1.3.2] Cc: security@freebsd.org References: <20020323214535.Y212-100000@phoenix.vh.laserfence.net> <20020323173331.A76680@nomad.lets.net> In-Reply-To: <20020323173331.A76680@nomad.lets.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: Sender: owner-freebsd-security@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Saturday, 23. March 2002 23:33, Steve Shorter wrote: > > 1777 means only the owner of a file can delete it. I bet /tmp > > has been set up 2777 or 3777 so all new files are being associated > > with the group /tmp belongs to (wheel). > > =09My experience with FreeBSD is that the "default" behavior > of directories is for files to have group ownership the same as > the directory they are created in. For example here is a brief > example > > > bash-2.05# mkdir testdir > bash-2.05# chown root:steve testdir > bash-2.05# >testdir/testfile > bash-2.05# ls -al > total 10 > drwxr-xr-x 5 root wheel 512 Mar 23 17:28 . > drwxr-xr-x 19 root wheel 512 Jan 19 17:18 .. > drwxr-xr-x 2 root steve 512 Mar 23 17:28 testdir > bash-2.05# ls -al testdir/ > total 2 > drwxr-xr-x 2 root steve 512 Mar 23 17:28 . > drwxr-xr-x 5 root wheel 512 Mar 23 17:28 .. > -rw-r--r-- 1 root steve 0 Mar 23 17:28 testfile Wow. I am pretty perplexed now, I didn't know that. I thought FreeBSD permissions / ownership would behave like those in Linux. Now I took a look at chmod's manpage and I saw that there's at least one more difference: SUID directories in Linux don't do=20 anything special, FreeBSD's do. > =09Or what am I missing? Nothing, I was. Thanks for the update ;) > =09-steve Bjoern To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message