Am I right in assuming that they would be awarded to the group that the owner belongs to?
Wrong. A file can belong to any user and any group. There is no relationship between user and group in such way.
Every file has user owner and group owner. These are separate entities. If you do ls -l
it will show you owner user and owner group of every file, e.g.:
$ ls -l
-rw-r--r-- 1 user_owner group_owner 22K May 2 13:06 file.png
-rw-r--r-- 1 user_owner group_owner 22K May 2 13:12 file.jpg
To change user owner, you use chown
command. To change group owner, you use chgrp
command.
You can also use chown
and specify both, user and a group, by separating them with colon like this:
$ chown user:group file