chgrp Command Generator
Generate chgrp commands to change group ownership of files
Getting Started with chgrp
## What is chgrp?
The `chgrp` command changes the **group** ownership of files and directories. It is the group-focused counterpart of `chown` and is commonly used to grant a team (e.g. `www-data`, `docker`) shared access to a set of files.
## How to Use
1. **Enter Group**: Provide the new owning group (name or numeric GID). 2. **Enter File**: Specify the target file or directory. 3. **Pick Options**: Use `-R` for recursive changes, `-v` to see each change, or `-h` to act on the symlink itself. 4. **Copy & Run**: Copy the generated command into your terminal.
> To change **both** owner and group in one step, use `chown user:group file` instead.
Common Options
### `-R` Recursive Operate on the file and everything inside the directory recursively. Combine with `-v` to verify each change.
### `-v` Verbose Print a diagnostic line for every file processed, including ones whose group did not change.
### `-c` Changes Like `-v`, but only report files whose group actually changed — quieter output for large trees.
### `-h` No dereference Affect the symbolic link itself instead of the file it points to. Without `-h`, `chgrp` follows the link and changes the target.
### `-f` Silent Suppress most error messages, such as 'Operation not permitted' on files you do not own.
▶How do I change the group of an entire project tree?
▶How do I change the group of a symlink, not its target?
▶chgrp vs chown — when do I use which?
If this tool has been helpful to you, consider buying me a coffee.
Buy me a coffee