$ chgrp
Change file group ownership
DOCUMENTEDPermissionsUbuntu 24.04 LTS baseline
Use care. This command changes file group ownership. Recursive changes can affect a large directory tree, so verify the path before using `-R`.
Synopsis
chgrp [OPTION]... GROUP FILE...
What it does
- `chgrp` changes the group ownership of files.
- Permissions and ownership are separate concepts; changing the group does not automatically change the permission bits.
Examples
Change a file's group
sudo chgrp developers project.txtChange a directory tree's group
sudo chgrp -R developers project/Important details
These examples are intentionally conservative. Command behavior can still depend on filesystem state, permissions, locale, shell, installed package version, and other system configuration.
For exact option semantics, the linked authoritative documentation is the source of truth.