4.0 likes s and S protections

Tony Landells munnari!technix.oz.au!ahl at uunet.uu.net
Wed Feb 1 22:42:07 AEST 1989


Moderator's annotation:
> ...Near as I can tell via experimentation, "chmod" now treats
> directories as a special case.  The only way to turn off the setgid
> bit on a directory is via "chmod g-s ...".

The current behaviour is documented in the manuals.  In the SunOS 4.0
Change Notes, section 2.4 (General Software Changes), it describes the new
semantics (under the margin label "Group ID for Newly-Created Files), and
suggests some options for either bringing your system into line or having
a filesystem use the old semantics.

As for the behaviour of chmod, chmod(1) says under numerical modes

	2000	Set group ID on execution (this bit is ignored if the file
		is a directory; it may be set or cleared only using symbolic
		mode).

Then there's the User's Guide in the Security Features Guide, which has a
little section on "Directories and Set Group ID" ...

This is the only documentation I can spot immediately, but I'm sure there
was something elsewhere which commented on the need to use symbolic modes
to affect directories - it's just a matter of looking for it.

[[ I found the parenthetical comment in the chmod manual page a few days
after I made that comment.  You have to admit, it is pretty well hidden in
that manual page.  When I initially scanned the manual page, I didn't see
it.  --wnl ]]



More information about the Comp.sys.sun mailing list