Title: chgrp and chown Commands
Course: CIS 121: Linux/UNIX I: Fundamentals ~ For IGNITE Review > Section: Learning Modules

chgrp

You can change the group assignment of a file using the chgrp command.

root@laika:/home/paul# chgrp paul FileForPaul

chown

The user owner of a file can be changed with the chown command. It is important you know, once you assign ownership to a different user, you will no longer have the ability to change permissions and assignments.

root@laika:/home/paul# chown paul FileForPaul

You can also use chown to change both the user owner and the group assignment.

root@laika:/home/paul# ls -l FileForPaul

-rw-r--r-- 1 paul paul 0 2008-08-06 14:11 FileForPaul

root@laika:/home/paul# chown root:project42 FileForPaul

root@laika:/home/paul# ls -l FileForPaul

-rw-r--r-- 1 root project42 0 2008-08-06 14:11 FileForPaul

(Source: Linux Fundamentals, Cobbaut, 215)