Linux change file owner

Submitted by lnlanner on Wed, 12/21/2011 - 22:48
Run a shell. To change a file owner, type:
chown USERNAME FILENAME
and press the ENTER key. To change the group type:
chgrp GROUPNAME FILENAME
and press the ENTER key. If you want to change directory owner / group (recursively) type
chown -R USERNAME ./FOLDERNAME
chgrp -R USERNAME ./FOLDERNAME

Note that, since the Unix-like systems are case-sensitive, the -R flag must be entered in uppercase.

© 2012 Luigi Negretti Lanner - All rights deserved. m