chgrp
chgrp is a Linux command in the Permissions category, rated intermediate difficulty. Changes group ownership of files and directories. The syntax is chgrp [options] group file. Key options and parameters: group, file — new group, target file. It returns none (group changed). A practical example: chgrp developers file.txt chgrp -R www-data /var/www # Recursive change\chgrp --reference=ref.txt target.txt # Use reference file's group A close relative is chmod, which changes file permissions (read, write, execute) for owner/group/others. A close relative is chown, which changes file owner and/or group ownership. A close relative is umask, which sets the default permission mask for newly created files and directories. More about this category: Linux permission commands — chmod, chown, chgrp, umask, and more. Manage file permissions and ownership. Related Permissions commands: chmod, chown, umask, sudo, su, getfacl, setfacl, chattr. This page is part of the free Linux Reference documentation covering 304+ commands, each with syntax, options, practical examples, and a difficulty rating.