Changing Owner / Changing Group in Linux
23 Jan 2012Changing Username and Group for a particular file
chown <username>:<groupname> <filename>
Changing Username and Group for directory and contents
chown -R <username>:<group> <directoryname>
Changing Username for a file
chown <username> <filename>
Changing Username for a directory
chown -R <username> <directoryname>
Changing Groupname for a file
chgrp <group> <filename>
chgrp -R <username> <directory>
chown :<group> <filename>
chown -R :<group> <directory>