How to change file’s owner and group in Linux

September 23rd, 2009 | Author: Sunny

%chown username filename

This will set the filename’s owner to username

%chown username:groupname filename

This will set the filename’s owner to username, group to groupname

with option -R, you can change owner and group of the directory recursively to its sub-directories and content.

%chown -R username:groupname directoryname
Category: Linux, Mac Stuff | Tags: , , , | Leave a Comment