1 .\" Copyright (c) 1983, 1990, 1993, 1994, 2003
2 .\" The Regents of the University of California. All rights reserved.
4 .\" This code is derived from software contributed to Berkeley by
5 .\" the Institute of Electrical and Electronics Engineers, Inc.
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\" notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\" notice, this list of conditions and the following disclaimer in the
14 .\" documentation and/or other materials provided with the distribution.
15 .\" 3. Neither the name of the University nor the names of its contributors
16 .\" may be used to endorse or promote products derived from this software
17 .\" without specific prior written permission.
19 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 .\" from: @(#)chgrp.1 8.3 (Berkeley) 3/31/94
32 .\" $NetBSD: chgrp.1,v 1.18 2006/06/17 02:22:02 reed Exp $
34 .Dd September 25, 2003
44 .Op Fl H | Fl L | Fl P
52 utility sets the group ID of the file named by each
56 ID specified by the group operand.
63 option is specified, symbolic links on the command line are followed.
64 (Symbolic links encountered in the tree traversal are not followed.)
68 option is specified, all symbolic links are followed.
72 option is specified, no symbolic links are followed.
74 Change the group ID for the file hierarchies rooted
75 in the files instead of just the files themselves.
77 The force option ignores errors, except for usage errors and doesn't
78 query about strange modes (unless the user does not have proper permissions).
82 is a symbolic link, the group of the link is changed.
86 to be verbose, showing files as they are processed.
91 is not given, unless the
97 on a symbolic link always succeeds and has no effect.
103 options are ignored unless the
106 In addition, these options override each other and the
107 command's actions are determined by the last one specified.
111 operand can be either a group name from the group database,
112 or a numeric group ID.
113 Since it is valid to have a group name that is numeric (and
114 doesn't have the numeric ID that matches its name) the name lookup
115 is always done first.
116 Preceding the ID with a ``#'' character will force it to be taken
121 must belong to the specified group and be the owner of the file,
122 or be the super-user.
124 Unless invoked by the super-user,
126 clears the set-user-id and set-group-id bits on a file to prevent
127 accidental or mischievous creation of set-user-id or set-group-id
132 utility exits 0 on success, and \*[Gt]0 if an error occurs.
134 .Bl -tag -width /etc/group -compact
149 utility is expected to be POSIX 1003.2 compatible.
153 option and the use of ``#'' to force a numeric group ID