LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Does root belong to all groups - Permissions Question (https://www.linuxquestions.org/questions/linux-newbie-8/does-root-belong-to-all-groups-permissions-question-637977/)

Cocytus1 04-26-2008 08:07 AM

Does root belong to all groups - Permissions Question
 
As a Linux newbie, I'm just trying to get my head around some of the core concepts of the OS.

The way Linux handles file permissions is much better than 'that legacy operating system' but I'm just trying to understand the way in which the root (superuser) has access in terms of file permissions.

I understand that root is the top dog and all other users are below root.

What I really want to know is if:

(a) root is automatically a member of all groups on the system

or

(b) root doesn't need to be a member of any group (of than root) because the kernel will give root access to everything irrespective of file permissions.

I think the answer is (b) but not sure!

Hope someone can help!?:scratch:

pixellany 04-26-2008 08:22 AM

On my machine, root is only in one group (root). But, I think your (b) answer is correct.

bigrigdriver 04-26-2008 08:35 AM

Here is a good definition of root as it applies to Unix/Linux systems.

p_quarles 04-26-2008 01:53 PM

Option B is correct. Privilege settings do not affect the root account.

You didn't ask, but I'll add this anyway: this is one of the main reasons why most people recommend against running things as root unless necessary. The fact that root has all privileges means that it can break privileges for other users fairly easily. For instance, creating a configuration file as root will mean that file is owned by root, and depending on the settings of the directory in which it is configured, may not be readable by other users. This would be easy to fix, of course, but is an example of the larger pattern of problems.

Controlling privileges via tools such as group settings and/or sudo is highly recommended for minimizing long-term frustrations.

Cocytus1 04-26-2008 03:50 PM

Thanks v much 4 ur answers. V helpful!


All times are GMT -5. The time now is 06:24 PM.