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

Giorgos Keramidas keramida at freebsd.org
Sun Jul 31 20:30:19 UTC 2005


The following reply was made to PR docs/84265; it has been noted by GNATS.

From: Giorgos Keramidas <keramida at freebsd.org>
To: "Gary W. Swearingen" <garys at opusnet.com>
Cc: bug-followup at freebsd.org
Subject: Re: docs/84265: chmod(1) manpage omits implication of setting w on directory
Date: Sun, 31 Jul 2005 23:25:09 +0300

 On 2005-07-31 17:50, "Gary W. Swearingen" <garys at opusnet.com> wrote:
 > Ceri Davies <ceri at submonkey.net> writes:
 > > On 29 Jul 2005, at 02:57, Gary W. Swearingen wrote:
 > > > 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.
 > >
 > > A reference to touch(1) rather than '>' reads better here, I think.
 >
 >
 >  How about this new para for chown(1) and chgrp(1)?
 >
 >        Files created in a directory will be generally be assigned the
 >        group ID of the directory, with exceptions including files added
 >        by cp(1) with -p and mv(1).
 
 ``Files created in a directory will be assigned the group ID of the
 directory'' period.  The fact that cp(1) and mv(1) call chown to set
 the permissions to something else is a feature of those programs and
 not of the file creation code.
 
 I'm not sure if I am happy when features of programs are documented as
 the behavior of the file/directory creation code.
 
 Documenting the implications of write permission is important, but
 please let us not modify perfectly fine parts of the manpage :-/
 
 >  I hope I handled that last period OK; it looks OK on my xterm.
 > [...]
 >  +with
 >  +.Fl p
 >  +and
 >  +.Xr mv 1 .
 
 It is very fine, thanks for all the attention to the details :-)
 



More information about the freebsd-doc mailing list