Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Aug 2005 12:53:37 -0300
From:      =?ISO-8859-1?Q?Jo=E3o_Carlos_Mendes_Lu=EDs?= <jonny@jonny.eng.br>
To:        Brooks Davis <brooks@one-eyed-alien.net>
Cc:        hackers@freebsd.org
Subject:   Re: File create permissions, what am I missing?
Message-ID:  <42FE1781.9050403@jonny.eng.br>
In-Reply-To: <20050812233728.GA22225@odin.ac.hmc.edu>
References:  <42FD15EA.8050500@jonny.eng.br> <20050812233728.GA22225@odin.ac.hmc.edu>

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42FE1781.9050403>