Change which group owns a file to control access quickly from the command line. 27.02.2026 | reading time: 2 min On Linux, group ownership is a key lever for access control; the `chgrp` command changes the group owner of files and directories so that different users can share resources correctly. Quick demo: change a file's group See it in action: ```\n$ ls -l report.txt\n-rw-r----- 1 alice sales 4096 Feb 27 10:00 report.txt\n$ sudo chgrp finance report.txt\n$ ls -l report.txt\n-rw-r----- 1 alice finance 4096 Feb 27 10:00 report.txt\n``` In practice a normal user can change a file's group only to groups he is a member of; root can change any file's group. Apply to directories and symlinks To change many files at once use `-R` for recursive updates and `-v` for verbose feedback, use `-h` to affect symbolic links themselves on systems that support it, and `--reference=FILE` to copy the group from another file; remember that changing a directory's group plus the setgid bit helps new files inherit the desired group. Permissions and practical limits Users can only change group to one of their supplementary groups unless they escalate to root, so group membership management matters; also consider `setfacl`/`getfacl` for more granular ACLs when standard Unix groups are not enough. Commands you will meet next `chown` changes owner and group, `chmod` adjusts permission bits, and `newgrp` switches the effective group for a shell session, all of which complement `chgrp` in everyday administration. Finish line Mastering `chgrp` is a small but vital step toward robust file-sharing and security on Linux; learn more and consider formalizing your skills with certifications like CompTIA Linux+ or LPIC-1, using bitsandbytes.academy for intensive exam preparation. Join Bits & Bytes Academy First class LINUX exam preparation. filesystem security utilities