Chown
chown changes the user and/or group ownership of a file or directory.
Examples:
Change the owner:
chown bob myfile.txt
Changes the owner of myfile.txt to bob
Change the group:
chown :office myfile.txt
Change just the group of myfile.txt to office.
Change the owner and the group:
chown bob:office myfile.txt
Change the owner of myfile.txt to bob, and change the group to office
Change the owner and group (shortcut):
chown bob. myfile.txt
Change the owner of myfile.txt to bob, and change the group to the bob group.
Change the owner and group for a directory, and all files and directories below it:
chown -R bob. /home/bob/workf