bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mkdir() and group id


From: Oystein Viggen
Subject: Re: mkdir() and group id
Date: Fri, 26 Apr 2002 19:41:18 +0200
User-agent: Gnus/5.090005 (Oort Gnus v0.05) XEmacs/21.1 (Capitol Reef, i386-debian-linux)

* [Paul Jarc] 

> This works with the SysV (aka Linux) behavior as well: if a directory
> is setgid, any files created within it inherit the group id, and any
> directories created within it inherit both the group id and the setgid
> bit.

The difference is that the SysV way won't work for more than one level
of directories.  Once you start making dirs within dirs[1], your sgid is
not inherited, and group ownership falls back to your default group,
instead of what you want.

To emulate current Hurd behaviour in Linux, you would need to devise a
way for the actual directory sgids to be inherited.  None of the two
ways can currently fully emulate the other.  Come to think of it, root
wouldn't normally be building stuff insite Marcus' home directory
anyway.

By the way, the scenario described by Thomas doesn't work for /tmp, as
it gives users access to each others' temp files.  (Provided, that is,
that you use group 0 as "wheel", as is currently the case with several
Linux distributions.)

Having a way to set an inherited umask for a directory would be nice,
but then you might as well let directories inherit the sgid bit and go
the SysV/Linux way.

Oystein
[1] mandatory Frank Herbert reference  ;)
-- 
Ebg13 arire tbrf bhg bs fglyr..



reply via email to

[Prev in Thread] Current Thread [Next in Thread]