B
B
by_EL2020-12-03 09:54:59
linux
by_EL, 2020-12-03 09:54:59

Why do we need Primary (main) groups for users, what is the point?

Why does a user need to have primary groups what is the difference between primary and regular groups?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2020-12-03
@saboteur_kiev

In POSIX systems, each file and each process must have an owner and a group. All basic access rights are tied to these UserID and GroupID.
That's actually when a user starts a process or creates a file / directory, for them this user is set as the owner, and the group of this user is set as the group.

K
ky0, 2020-12-03
@ky0

When a user creates an object on the FS, he (the object) is automatically assigned the UID and GID of the owner. So, this GID is, in terms of your question, the main group. Usually its name is the same as the username, but variations are possible.
The remaining groups are technically no different and regulate access in the same way.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question