]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
doc: clarify chgrp restrictions
authorPádraig Brady <P@draigBrady.com>
Thu, 19 Jun 2014 17:49:18 +0000 (18:49 +0100)
committerPádraig Brady <P@draigBrady.com>
Thu, 19 Jun 2014 18:56:58 +0000 (19:56 +0100)
* doc/coreutils.texi (chown invocation): Mention the system dependent
restrictions on setting groups.
(chgrp invocation): Likewise. Reference the 'chown' superset.
* man/chgrp.x: Cross reference chown(1) which is the superset interface,
and also chown(2) which gives details of the platform restrictions.
Fixes http://bugs.gnu.org/17495

doc/coreutils.texi
man/chgrp.x

index 3cdfb72fed0e717430a93856aa24c0f70fb3404c..96220c3508b78baad4b59f0cc1c431526b490e9c 100644 (file)
@@ -10525,6 +10525,13 @@ portable, and because it has undesirable results if the entire
 @var{owner@samp{.}group} happens to identify a user whose name
 contains @samp{.}.
 
+@macro chownGroupRestrictions
+It is system dependent whether a user can change the group to an arbitrary one,
+or the more portable behavior of being restricted to setting a group of
+which the user is a member.
+@end macro
+@chownGroupRestrictions
+
 The @command{chown} command sometimes clears the set-user-ID or
 set-group-ID permission bits.  This behavior depends on the policy and
 functionality of the underlying @code{chown} system call, which may
@@ -10685,7 +10692,8 @@ chown -hR root /u
 
 @command{chgrp} changes the group ownership of each given @var{file}
 to @var{group} (which can be either a group name or a numeric group ID)
-or to the group of an existing reference file.  Synopsis:
+or to the group of an existing reference file.  @xref{chown invocation}.
+Synopsis:
 
 @example
 chgrp [@var{option}]@dots{} @{@var{group} | --reference=@var{ref_file}@}@c
@@ -10696,6 +10704,8 @@ If @var{group} is intended to represent a
 numeric group ID, then you may specify it with a leading @samp{+}.
 @xref{Disambiguating names and IDs}.
 
+@chownGroupRestrictions
+
 The program accepts the following options.  Also see @ref{Common options}.
 
 @table @samp
index 1ceeafc3c2dbb3b74937a79fbb994519a4f261fa..a61f3089ebf2d980ac5b6ab4c441567c671c0be0 100644 (file)
@@ -2,3 +2,5 @@
 chgrp \- change group ownership
 [DESCRIPTION]
 .\" Add any additional description here
+[SEE ALSO]
+chown(1), chown(2)