main group is genetics
and one wants to add him/her to group biochem
and to assign biochem
as his/her secondary group will the following suffice ?
$ sudo usermod -G biochem user1
I would like for user1
to have genetics
as the main group but also belong to biochem
. When user1 creates a file, as he/she belongs to main group genetics
, I assume the file will be owned by user1
and group owner will be genetics
. Ideally files created by user1
should be accessible to users in group genetics
(when permissions are tweaked) but not by individuals in group biochem
. However, any files with group owner biochem
should be accessible to user1
as he/she does belong to biochem
as a secondary group.
Would having user1 main group genetics, secondary group biochem fulfil this criteria ?