Primary group vs supplementary groups?
IntermediateConceptPermissions, Users & sudo
Answer
Every user has one primary group (GID in /etc/passwd) used as the group for new files, and any number of supplementary groups that grant extra access.
id alice
sudo usermod -aG docker alice # -a is critical: without it, other groups are removed
newgrp docker # pick up the new group in the current shell
Group changes apply to new login sessions only.
More on Permissions, Users & sudo
Explain the rwx permission model for files and directories.BeginnerHow does octal notation work in chmod?BeginnerWhat does chown do and who can run it?IntermediateWhat is umask and how is the final permission calculated?IntermediateWhat is SUID and give a real example?IntermediateWhat does SGID do on files versus directories?Intermediate