With umask
, I can determine the permissions for newly created files. But if I am a member of multiple groups, how do I set the default group for newly created files?
This question seems relevant, but its answers relate how the system administrator can change the default group for a particular user. I am not system administrator, but just a mere user, and have no permission to do usermod -g
even on myself. So how would I proceed to set the default group for newly created files?
groups
(at least on Arch) sorts them by numerical value, the primary group is not the first listed. Useid
to get these details. – orion Mar 04 '14 at 19:30newgrp
launches a new shell. I don't think there's any way to change the default group for an existing process. – Keith Thompson Mar 04 '14 at 20:12