docs/84265: chmod(1) manpage omits implication of setting w on directory

Gary W. Swearingen garys at opusnet.com
Fri Jul 29 02:40:16 UTC 2005


>Number:         84265
>Category:       docs
>Synopsis:       chmod(1) manpage omits implication of setting w on directory
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 29 02:40:13 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Gary W. Swearingen
>Release:        FreeBSD 5.4-RELEASE i386
>Organization:
none
>Environment:
n/a
>Description:

The manpage gives some implications of setting SUID on a directory
but not W.

The concept mentioned below is not covered elsewhere AFAIK, at least
outside c-programmer manpages.  It should be.

>How-To-Repeat:
n/a

>Fix:
Apply patch.

I'd also add the following paragraph to the chmod(1) and chgrp(1)
manpages, but I'll wait for approval before making patches.

   The group of a directory will be assigned to files newly created
   (eg, by > or an editor, but not by mv or cp) within it, despite the
   owner or group of the creator.


--- /pr/work/chmod..orig.1	Wed Jul 27 18:05:44 2005
+++ /pr/work/chmod.1	Wed Jul 27 18:14:08 2005
@@ -276,6 +276,16 @@
 ``o'' by itself), in combination with the
 .Ar perm
 symbols ``s'' or ``t'', are ignored.
+.Pp
+Setting the write permission on a directory will enable files to be
+moved into or copied into or created in the directory.  Files
+created in the directory (eg, by
+.Nm >
+or an editor, but not by
+.Nm mv
+or 
+.Nm cp )
+will be assigned the group of the directory.
 .Sh EXAMPLES
 .Bl -tag -width "u=rwx,go=u-w" -compact
 .It Li 644
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-doc mailing list