1.\" Copyright (c) 1983, 1990, 1993, 1994 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" This code is derived from software contributed to Berkeley by 5.\" the Institute of Electrical and Electronics Engineers, Inc. 6.\" 7.\" %sccs.include.redist.man% 8.\" 9.\" @(#)chgrp.1 8.3 (Berkeley) 03/31/94 10.\" 11.Dd 12.Dt CHGRP 1 13.Os BSD 4.2 14.Sh NAME 15.Nm chgrp 16.Nd change group 17.Sh SYNOPSIS 18.Nm chgrp 19.Oo 20.Fl R 21.Op Fl H | Fl L | Fl P 22.Oc 23.Op Fl f 24.Ar group 25.Ar files ... 26.Sh DESCRIPTION 27The chgrp utility sets the group ID of the file named by each 28.Ar file 29operand to the 30.Ar group 31ID specified by the group operand. 32.Pp 33Options: 34.Bl -tag -width Ds 35.It Fl H 36If the 37.Fl R 38option is specified, symbolic links on the command line are followed. 39(Symbolic links encountered in the tree traversal are not followed.) 40.It Fl L 41If the 42.Fl R 43option is specified, all symbolic links are followed. 44.It Fl P 45If the 46.Fl R 47option is specified, no symbolic links are followed. 48.It Fl R 49Change the group ID for the file hierarchies rooted 50in the files instead of just the files themselves. 51.It Fl f 52The force option ignores errors, except for usage errors and doesn't 53query about strange modes (unless the user does not have proper permissions). 54.El 55.Pp 56Symbolic links don't have groups, so unless the 57.Fl H 58or 59.Fl L 60option is set, 61.Nm chgrp 62on a symbolic link always succeeds and has no effect. 63The 64.Fl H , 65.Fl L 66and 67.Fl P 68options are ignored unless the 69.Fl R 70option is specified. 71In addition, these options override each other and the 72command's actions are determined by the last one specified. 73.Pp 74The 75.Ar group 76operand can be either a group name from the group database, 77or a numeric group ID. 78If a group name is also a numeric group ID, the operand is used as a 79group name. 80.Pp 81The user invoking 82.Nm chgrp 83must belong to the specified group and be the owner of the file, 84or be the super-user. 85.Pp 86The 87.Nm chgrp 88utility exits 0 on success, and >0 if an error occurs. 89.Sh COMPATIBILITY 90Previous versions of the 91.Nm chgrp 92utility changed the group of symbolic links specified on the command 93line. 94In this system, symbolic links do not have groups. 95.Sh FILES 96.Bl -tag -width /etc/group -compact 97.It Pa /etc/group 98Group ID file 99.El 100.Sh SEE ALSO 101.Xr chown 2 , 102.Xr group 5 , 103.Xr passwd 5 , 104.Xr fts 3 , 105.Xr symlink 7 , 106.Xr chown 8 107.Sh STANDARDS 108The 109.Nm chgrp 110utility is expected to be POSIX 1003.2 compatible. 111