Linux _ system management_process control_1

Source: Internet
Author: User

PID: process ID.

The kernel assigns a unique ID number to each process. a pid is required for commands and system calls of many operation processes to identify the operation objects. The PID is generated in the order in which the process is created.

 

Ppid: parent process ID

Linux does not support creating a new process to execute a specificProgram. New processes are always generated by cloning a process itself. The cloned process can replace the currently running program with another one.

When a process is cloned, the original process becomes the parent process, and the copied process acts as its child process. The ppid attribute of a process stores the PID of its parent process. If the original parent process is terminated, process Init (process 1) becomes the parent process of the child process.

 

UID and EUID: real user ID and valid user ID)

UID describes the user who created the process. More accurately, it is a copy of the UID value of the parent process. Generally, only the process creator (also known as the owner) and super user have the permission to operate the process.

EUID is an additional uid that describes the resources and files that a process has access to at any given time.

For most processes, the UID and EUID are the same. For exceptions, you can consider setuid.

Storing UID and EUID is useful when maintaining identity and permission (permission, considering that a setuid program does not always want to operate with an extended permission. The EUID of a process can be set or reset to allow or restrict additional permissions of the process.

Linux also saves a "saved uid", which is also called a save uid. The SUID is assigned the same value as EUID when the process starts execution for the first time. Unless the process takes some measures to erase the saved uid, it can always be used as UID or EUID. Therefore, a cautiously constructed setuid program can access these privileges only when necessary, regardless of the privileges it holds during most of the execution of the program.

 

Fsuid

Linux also defines non-standard fsuid process parameters to control the judgment of file system permissions, but this does not seem to be common outside the kernel.

 

GID and EGID: Real and valid group ID

GID is the group ID of a process. The relationship between EGID and GID is the same as that between EUID and uid, because it can be switched by a setuid program. Similar to the saved uid, the kernel also maintains a saved GID.

GID is not very useful. From the perspective of access control, a process can be a member of several groups at the same time. To determine the access permission, you generally need to consider the EGID and the appended group list, but not the GID.

GID takes effect only when a process creates a new file. How to Set file system permissions determines that the GID of the process for creating the file may be used for the new file.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.