Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Console Foundations Users and Permissions File Ownership

SERGIO RODRIGUEZ
SERGIO RODRIGUEZ
17,532 Points

[SOLVED] How can I change only the group owner of a file ?

Jim explains how to change the owner of a file with the chown command and also shows how to change both the owner and the group onwer.

How can I change the group owner only?

1 Answer

SERGIO RODRIGUEZ
SERGIO RODRIGUEZ
17,532 Points

You just need to add the argument after the ':'

For example if you want change the group owner to mikegroup you will type

sudo chown :mikegroup hello.txt