Skip to main content

Use the chgrp command to change group ownership of files and folders.

# To change the owner group of a file/folder:
chgrp <group> <path/to/file>

# To recursively change the owner group of a folder and its contents:
chgrp -R <group> <path/to/folder>

# To change the owner group of a symbolic link:
chgrp -h <group> <path/to/symlink>

# To change the owner group of a file/folder to match a reference file:
chgrp --reference=<path/to/reference_file> <path/to/file>