1.\" $OpenBSD: chgrp.1,v 1.12 2009/02/08 17:15:08 jmc Exp $ 2.\" 3.\" Copyright (c) 1983, 1990, 1993, 1994 4.\" The Regents of the University of California. All rights reserved. 5.\" 6.\" This code is derived from software contributed to Berkeley by 7.\" the Institute of Electrical and Electronics Engineers, Inc. 8.\" 9.\" Redistribution and use in source and binary forms, with or without 10.\" modification, are permitted provided that the following conditions 11.\" are met: 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 3. Neither the name of the University nor the names of its contributors 18.\" may be used to endorse or promote products derived from this software 19.\" without specific prior written permission. 20.\" 21.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31.\" SUCH DAMAGE. 32.\" 33.\" from: @(#)chgrp.1 8.3 (Berkeley) 3/31/94 34.\" 35.Dd $Mdocdate: February 8 2009 $ 36.Dt CHGRP 1 37.Os 38.Sh NAME 39.Nm chgrp 40.Nd change group 41.Sh SYNOPSIS 42.Nm chgrp 43.Op Fl fh 44.Oo 45.Fl R 46.Op Fl H | L | P 47.Oc 48.Ar group 49.Ar 50.Sh DESCRIPTION 51.Nm 52sets the group ID of the specified files. 53.Pp 54The options are as follows: 55.Bl -tag -width Ds 56.It Fl f 57The force option ignores errors, except for usage errors. 58.It Fl H 59If the 60.Fl R 61option is specified, symbolic links on the command line are followed. 62(Symbolic links encountered in the tree traversal are not followed.) 63.It Fl h 64Change the group ID of the specified symbolic link. 65The 66.Fl h 67and 68.Fl R 69options are mutually exclusive. 70.It Fl L 71If the 72.Fl R 73option is specified, all symbolic links are followed. 74.It Fl P 75If the 76.Fl R 77option is specified, no symbolic links are followed. 78.It Fl R 79Change the group ID for the file hierarchies rooted 80in the files instead of just the files themselves. 81.El 82.Pp 83The 84.Fl H , 85.Fl L , 86and 87.Fl P 88options are ignored unless the 89.Fl R 90option is specified. 91In addition, these options override each other and the 92command's actions are determined by the last one specified. 93.Pp 94The 95.Ar group 96operand can be either a group name from the group database, 97or a numeric group ID. 98If a group name is also a numeric group ID, the operand is used as a 99group name. 100.Pp 101The user invoking 102.Nm 103must belong to the specified group and be the owner of the file, 104or be the superuser. 105.Pp 106.Ex -std chgrp 107.Sh FILES 108.Bl -tag -width /etc/group -compact 109.It Pa /etc/group 110group ID file 111.El 112.Sh SEE ALSO 113.Xr chown 2 , 114.Xr fts 3 , 115.Xr group 5 , 116.Xr passwd 5 , 117.Xr symlink 7 , 118.Xr chown 8 119.Sh STANDARDS 120The 121.Nm 122utility is compliant with the 123.St -p1003.1-2008 124specification. 125.Pp 126The flag 127.Op Fl f 128is an extension to that specification. 129