Home >Operation and Maintenance >Linux Operation and Maintenance >What are root permissions in linux

What are root permissions in linux

WBOY
WBOYOriginal
2022-05-23 16:08:1111508browse

In Linux, root authority is the highest management authority of the super administrator user; root authority can transcend any user and user group to read, modify or delete files or directories; Linux uses UID to distinguish user authority levels , the user with UID 0 is recognized by the system as having super permissions, that is, root permissions.

What are root permissions in linux

#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

What is the root permission of Linux?

Root permission is a type of system permission. It can be understood as the same concept as SYSTEM permission, but it is higher than Administrator permission. Root is in Linux and unix systems. The super administrator user account has supreme power over the entire system and can operate all objects.

In the Linux operating system, root has the highest authority and is also called the owner of super authority. . Operations that cannot be performed by ordinary users can be completed by the root user, so it is also called a super administrative user.

In the system, every file, directory and process belongs to a certain user. Without the user's permission, other ordinary users cannot operate it, except for root. The privileges of the root user are also reflected in the fact that root can transcend any user and user group to read, modify or delete files or directories (within the normal permission range of the system); execute and terminate executable programs; and modify hardware devices. Add, create and remove, etc.; You can also modify the owners and permissions of files and directories to suit the needs of system management (because root is the most privileged user in the system);

Understanding of super users and ordinary users;

What is a super user;

In all Linux systems, the system distinguishes user permission levels through UID, and UID is User 0 is agreed by the system to have super permissions. The super user has the highest authority agreed upon by the system to operate within the park, so the super user can complete all tools for system management; we can use /etc/passwd to find out that the user with UID 0 is root, and only the UID corresponding to root is is 0. From this point of view, the root user has irreplaceable supremacy and unlimited authority in the system. The root user is the super user in the system;

Understand the corresponding relationship between UID and user

When the system is installed by default, the system user and UID have a one-to-one relationship, that is to say, a UID corresponds to a user. We know that user identity is confirmed through UID. We mentioned in the explanation of UID in "Detailed Explanation of User and User Group Configuration Files" that "UID is the identifier for confirming user permissions. The user logs in to the system. The role of the user is realized through UID, not user name; it is dangerous for several users to share the same UID. For example, if we change the UID of the ordinary user to 0 and share the same UID with root, this will actually cause the system to break down. The confusion of management permissions. If we want to use root permissions, we can do it through su or sudo; we must not let a user share the same UID with root at will; "

Super user (permissions) in system management Role

What role does the super privileged user (user with UID 0) play in system management? Mainly reflected in the following two points;

1. Perform operations on any file, directory or process Operation;

But it is worth noting that this operation is within the highest permission range of the system; some operations cannot be completed even by root with super privileges;

For example, the /proc directory, / proc is used to reflect the real-time status information of the system running, so even root cannot do anything; its permissions are as follows

The code is as follows:

[root@localhost ~]# pwd
/root
[root@localhost ~]# cd /
[root@localhost /]# ls -ld /proc/
dr-xr-xr-x 134 root root 0 2005-10-27 /proc/

It is this directory, which can only be read and executed permission, but there is absolutely no write permission; even if we open the write permission of the /proc directory to root, the root user cannot perform write operations;

The code is as follows:

[root@localhost ~]# chmod 755 /proc
[root@localhost /]# ls -ld /proc/
drwxr-xr-x 134 root root 0 2005-10-27 /proc/
[root@localhost /]# cd /proc/
[root@localhost proc]# mkdir testdir

mkdir: Unable to create Directory 'testdir': No such file or directory

Recommended learning:Linux video tutorial

The above is the detailed content of What are root permissions in linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn