Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Mar 2002 00:13:53 +0100
From:      Bjoern Engels <bjoern.engels@mail.isis.de>
To:        Steve Shorter <steve@nomad.lets.net>
Cc:        security@freebsd.org
Subject:   Re: strange behaviour on /tmp
Message-ID:  <E16ouhu-000HZ0-00@pumaman.dyndns.org>
In-Reply-To: <20020323173331.A76680@nomad.lets.net>
References:  <20020323214535.Y212-100000@phoenix.vh.laserfence.net> <E16otir-000HR6-00@pumaman.dyndns.org> <20020323173331.A76680@nomad.lets.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E16ouhu-000HZ0-00>