1dea673e9SRodney W. Grimes.\" Copyright (c) 1983, 1990, 1993, 1994 2dea673e9SRodney W. Grimes.\" The Regents of the University of California. All rights reserved. 3dea673e9SRodney W. Grimes.\" 4dea673e9SRodney W. Grimes.\" This code is derived from software contributed to Berkeley by 5dea673e9SRodney W. Grimes.\" the Institute of Electrical and Electronics Engineers, Inc. 6dea673e9SRodney W. Grimes.\" 7dea673e9SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without 8dea673e9SRodney W. Grimes.\" modification, are permitted provided that the following conditions 9dea673e9SRodney W. Grimes.\" are met: 10dea673e9SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright 11dea673e9SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer. 12dea673e9SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright 13dea673e9SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer in the 14dea673e9SRodney W. Grimes.\" documentation and/or other materials provided with the distribution. 15dea673e9SRodney W. Grimes.\" 4. Neither the name of the University nor the names of its contributors 16dea673e9SRodney W. Grimes.\" may be used to endorse or promote products derived from this software 17dea673e9SRodney W. Grimes.\" without specific prior written permission. 18dea673e9SRodney W. Grimes.\" 19dea673e9SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 20dea673e9SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21dea673e9SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22dea673e9SRodney W. Grimes.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 23dea673e9SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24dea673e9SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25dea673e9SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26dea673e9SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27dea673e9SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28dea673e9SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29dea673e9SRodney W. Grimes.\" SUCH DAMAGE. 30dea673e9SRodney W. Grimes.\" 31dea673e9SRodney W. Grimes.\" @(#)chgrp.1 8.3 (Berkeley) 3/31/94 3297d92980SPeter Wemm.\" $FreeBSD$ 33dea673e9SRodney W. Grimes.\" 34*bb577bb6SConrad Meyer.Dd January 7, 2017 35dea673e9SRodney W. Grimes.Dt CHGRP 1 36a4c37c81SRuslan Ermilov.Os 37dea673e9SRodney W. Grimes.Sh NAME 38dea673e9SRodney W. Grimes.Nm chgrp 39dea673e9SRodney W. Grimes.Nd change group 40dea673e9SRodney W. Grimes.Sh SYNOPSIS 41e97407b4SRuslan Ermilov.Nm 421901b124SGavin Atkinson.Op Fl fhvx 43dea673e9SRodney W. Grimes.Oo 44dea673e9SRodney W. Grimes.Fl R 45dea673e9SRodney W. Grimes.Op Fl H | Fl L | Fl P 46dea673e9SRodney W. Grimes.Oc 47dea673e9SRodney W. Grimes.Ar group 4870423e21SPhilippe Charnier.Ar 49dea673e9SRodney W. Grimes.Sh DESCRIPTION 50cc09f59aSPhilippe CharnierThe 51cc09f59aSPhilippe Charnier.Nm 52cc09f59aSPhilippe Charnierutility sets the group ID of the file named by each 53dea673e9SRodney W. Grimes.Ar file 54dea673e9SRodney W. Grimesoperand to the 55dea673e9SRodney W. Grimes.Ar group 56dea673e9SRodney W. GrimesID specified by the group operand. 57dea673e9SRodney W. Grimes.Pp 5870423e21SPhilippe CharnierThe following options are available: 5970423e21SPhilippe Charnier.Bl -tag -width indent 60dea673e9SRodney W. Grimes.It Fl H 61dea673e9SRodney W. GrimesIf the 62dea673e9SRodney W. Grimes.Fl R 63ad34caceSSteven Hartlandoption is specified, symbolic links on the command line are followed 64ad34caceSSteven Hartlandand hence unaffected by the command. 65ad34caceSSteven Hartland(Symbolic links encountered during traversal are not followed.) 66dea673e9SRodney W. Grimes.It Fl L 67dea673e9SRodney W. GrimesIf the 68dea673e9SRodney W. Grimes.Fl R 69dea673e9SRodney W. Grimesoption is specified, all symbolic links are followed. 70dea673e9SRodney W. Grimes.It Fl P 71dea673e9SRodney W. GrimesIf the 72dea673e9SRodney W. Grimes.Fl R 73dea673e9SRodney W. Grimesoption is specified, no symbolic links are followed. 7495a09b05SRuslan ErmilovThis is the default. 75dea673e9SRodney W. Grimes.It Fl R 76ad34caceSSteven HartlandChange the group ID of the file hierarchies rooted in the files, 77ad34caceSSteven Hartlandinstead of just the files themselves. 78ad34caceSSteven HartlandBeware of unintentionally matching the 79ad34caceSSteven Hartland.Dq Pa ".." 80ad34caceSSteven Hartlandhard link to the parent directory when using wildcards like 81ad34caceSSteven Hartland.Dq Li ".*" . 82dea673e9SRodney W. Grimes.It Fl f 830227791bSRuslan ErmilovThe force option ignores errors, except for usage errors and does not 84dea673e9SRodney W. Grimesquery about strange modes (unless the user does not have proper permissions). 852e08522bSPeter Wemm.It Fl h 862e08522bSPeter WemmIf the file is a symbolic link, the group ID of the link itself is changed 872e08522bSPeter Wemmrather than the file that is pointed to. 885bb83b98SDavid E. O'Brien.It Fl v 895bb83b98SDavid E. O'BrienCause 905bb83b98SDavid E. O'Brien.Nm 915bb83b98SDavid E. O'Briento be verbose, showing files as the group is modified. 92ae29e300SJohan KarlssonIf the 93ae29e300SJohan Karlsson.Fl v 94ae29e300SJohan Karlssonflag is specified more than once, 95ae29e300SJohan Karlsson.Nm 96ae29e300SJohan Karlssonwill print the filename, followed by the old and new numeric group ID. 971901b124SGavin Atkinson.It Fl x 981901b124SGavin AtkinsonFile system mount points are not traversed. 99dea673e9SRodney W. Grimes.El 100dea673e9SRodney W. Grimes.Pp 101dea673e9SRodney W. GrimesThe 102dea673e9SRodney W. Grimes.Fl H , 103dea673e9SRodney W. Grimes.Fl L 104dea673e9SRodney W. Grimesand 105dea673e9SRodney W. Grimes.Fl P 106dea673e9SRodney W. Grimesoptions are ignored unless the 107dea673e9SRodney W. Grimes.Fl R 108dea673e9SRodney W. Grimesoption is specified. 109dea673e9SRodney W. GrimesIn addition, these options override each other and the 110dea673e9SRodney W. Grimescommand's actions are determined by the last one specified. 111dea673e9SRodney W. Grimes.Pp 112dea673e9SRodney W. GrimesThe 113dea673e9SRodney W. Grimes.Ar group 114dea673e9SRodney W. Grimesoperand can be either a group name from the group database, 115dea673e9SRodney W. Grimesor a numeric group ID. 116dea673e9SRodney W. GrimesIf a group name is also a numeric group ID, the operand is used as a 117dea673e9SRodney W. Grimesgroup name. 118dea673e9SRodney W. Grimes.Pp 119dea673e9SRodney W. GrimesThe user invoking 120cc09f59aSPhilippe Charnier.Nm 121dea673e9SRodney W. Grimesmust belong to the specified group and be the owner of the file, 122dea673e9SRodney W. Grimesor be the super-user. 123*bb577bb6SConrad Meyer.Pp 124*bb577bb6SConrad MeyerIf 125*bb577bb6SConrad Meyer.Nm 126*bb577bb6SConrad Meyerreceives a 127*bb577bb6SConrad Meyer.Dv SIGINFO 128*bb577bb6SConrad Meyersignal (see the 129*bb577bb6SConrad Meyer.Cm status 130*bb577bb6SConrad Meyerargument for 131*bb577bb6SConrad Meyer.Xr stty 1 ) , 132*bb577bb6SConrad Meyerthen the current filename as well as the old and new group names are 133*bb577bb6SConrad Meyerdisplayed. 13459a3c79dSRuslan Ermilov.Sh FILES 13559a3c79dSRuslan Ermilov.Bl -tag -width /etc/group -compact 13659a3c79dSRuslan Ermilov.It Pa /etc/group 13759a3c79dSRuslan Ermilovgroup ID file 13859a3c79dSRuslan Ermilov.El 139a866e170SRuslan Ermilov.Sh EXIT STATUS 140d628d776SRuslan Ermilov.Ex -std 141dea673e9SRodney W. Grimes.Sh COMPATIBILITY 1422e08522bSPeter WemmIn previous versions of this system, symbolic links did not have groups. 1435bb83b98SDavid E. O'Brien.Pp 1445bb83b98SDavid E. O'BrienThe 1455bb83b98SDavid E. O'Brien.Fl v 1461901b124SGavin Atkinsonand 1471901b124SGavin Atkinson.Fl x 1481901b124SGavin Atkinsonoptions are non-standard and their use in scripts is not recommended. 149dea673e9SRodney W. Grimes.Sh SEE ALSO 150dea673e9SRodney W. Grimes.Xr chown 2 , 151bfd34a4aSWolfram Schneider.Xr fts 3 , 152dea673e9SRodney W. Grimes.Xr group 5 , 153dea673e9SRodney W. Grimes.Xr passwd 5 , 154dea673e9SRodney W. Grimes.Xr symlink 7 , 155dea673e9SRodney W. Grimes.Xr chown 8 156dea673e9SRodney W. Grimes.Sh STANDARDS 157dea673e9SRodney W. GrimesThe 158cc09f59aSPhilippe Charnier.Nm 159cc09f59aSPhilippe Charnierutility is expected to be 160cc09f59aSPhilippe Charnier.St -p1003.2 161cc09f59aSPhilippe Charniercompatible. 162