O'Reilly logo

SAMS Teach Yourself Unix in 10 Minutes by Robert Shimonski

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required