, short for change group, is a shell command for changing the group associated with a Unix-based file system file including special files such as directories. Changing the group of a file is restricted to a super-user (such as via ) or to the file's owning user if the user is in the specified group.
A file has access permissions for the owning user, a group and for others. Changing the group for a file changes access to it based on users' group memberships.
The command was originally developed as part of the Unix operating system by AT&T Bell Laboratories. It is available in most Unix-like systems, Plan 9, Inferno and IBM i.
The version of <code>chgrp</code> bundled in GNU coreutils was written by David MacKenzie.
Generally, the syntax can be described as:
chgrp [options] group files
Options:
The following demonstrates changing the group of files matching to staff provided the user owns the files (is gbeeker) and is a member of staff. The change will allow members of the group staff to modify the files since the group-class permissions (read/write) will apply, not the others-class permissions (read only).