The chown (and chgrp) command

chown, or CHangeOWNer, is really, really easy to use. chgrp is even easier. There are only a small handful of switches, only two of which are commonly used, and only three arguments to the command.

First, the switches:

-R     this sets recursion
-v     this sets verbosity

As for the arguments, well, you can either set the user only:

chown username foobar

set the group only:

chown :groupname foobar/
chgrp groupname foobar/

or set both at the same time:

chown username:groupname foobar

That’s pretty much it. Don’t forget the recursive switch if you need it.

Tagged , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published.

Protected by WP Anti Spam