Using chgrp

Although you can't change a file's owner, you can change the group that a file belongs to. You can do this with the chgrp command. chgrp is a Unix command used to change the group setting. The chgrp command stands for “change group.” The chgrp command marks a file as being part of a different group. To do this, however, you must be a member of that group. Your Unix system administrator has the capability to create new groups and add users to these groups. If you have any questions about your own group membership(s), ask your administrator how your account was configured.

To use chgrp, follow these steps:

1.
Choose the file or files you want to change.
2.
Determine which group the file now belongs to.
3.
Change the file's group using ...

Get SAMS Teach Yourself Unix in 10 Minutes now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.