sgid bit on dirs Was: Re: problems w/pppd 2.3.7
On Wed, 14 Apr 1999, Jeremy wrote:
> On 14 Apr 1999, John Hasler wrote:
>
> > Jeremy writes:
> > > drwxr-s--- 2 root dip 1024 Apr 12 08:17 /etc/chatscripts
> > > ...
> >
> > Set group ID on execution on a directory does nothing useful that I know
> > of. The group needs execute permission to search the directory:
> >
> > drwxr-x--- 2 root dip 1024 Apr 12 08:17 /etc/chatscripts
The following applies to linux, and I suspect to most recent
versions of unix. This info is should be more well known.
The set group id on a directory aids in the sharing of files under
a directory by forcing created files to take on the same group ownership
as the directory. If root creates a file in Jeremy's /etc/chatscripts
example, the ownership will be root.dip not root.root.
A related point:
The sticky bit on a directory prevents another user from
deleting your file, unless he owns the directory.
Good for TMPDIR's:
drwxrwxrwt 2 root root 1024 Apr 15 08:90 /tmp
Reply to: