Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Aug 1998 09:00:01 +0200 (CEST)
From:      Andreas Klemm <andreas@klemm.gtn.com>
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   docs/7504: sgid bit on directories undocumented in chmod(1) and umask...
Message-ID:  <199808060700.JAA03734@klemm.gtn.com>

next in thread | raw e-mail | index | archive | help

>Number:         7504
>Category:       docs
>Synopsis:       sgid bit on directories undocumented in chmod(1) and umask...
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-doc
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug  6 00:20:03 PDT 1998
>Last-Modified:
>Originator:     Andreas Klemm
>Organization:
>Release:        FreeBSD 3.0-CURRENT i386
>Environment:

	FreeBSD-current and surely -STABLE

>Description:

	The chmod manpage only describes that it's possible to
	set the s-bit for the directory owner, but it's also
	possible to set the s bit of a directory, so that files
	created in this directory get the GID of the directory
	group and not the GID of the person who created the file.

	It's possible that the mount manpage has to be updated
	as well.

	And ... look at Part II. When I remember right, then
	the s bit set's also the umask of that directory in
	SunOS 4 and 5. That makes it possible, to force workgroups
	to an umask of 002. Would that be a wanted feature or
	is it missing here ??? Other voices.

>How-To-Repeat:

	Part I
	======
	mkdir foo
	touch foo/before
	ls -l foo/before
	-rw-r--r--  1 root  wheel  0  6 Aug 08:47 before
	chgrp operator foo
	chmod g+s operator
	ls -ld foo
	drwxr-sr-x  2 root  operator  512  6 Aug 08:47 foo
	touch foo/after_sbit
	ls -l foo/after_sbit
	-rw-r--r--  1 root  operator  0  6 Aug 08:49 after_sbit
			    ^^^^^^^^

	Part II
	=======
	chmod g+w
	ls -ld foo
	drwxrwsr-x  2 root  operator  512  6 Aug 08:49 foo
	     ^ !
	touch foo/after_g+w
	ls -l foo/after_g+w
	-rw-r--r--  1 root  operator  0  6 Aug 08:51 after_g+w
	     ^ ?! missing ?

>Fix:
	
	Doku fix for chmod(1), chmod(2) and possibly mount(1)
	Concerning mount: there is a suiddir option, do we need
	a sgiddir option as well ???

>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message



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