Actual User (group) ID:Identifies who the user is, and the two fields are taken from the login entry in the password file when they log on.Valid user (group) ID:Determines access to the file, usually valid user (group) ID equals the actual user
Process Group ID operation, process group idZookeeper
Process relationship
Call format# Include
Int setpgid (pid_t pid, pid_t pgid );Pid_t getpgid (pid_t pid );
Pid_t getpgrp (void);/* POSIX.1 version */Pid_t getpgrp (psid_t pid);/* BSD version
1. Change the user ID and group ID
1.1. Set the user ID and group ID
There are 6 or more IDs associated with the process, as shown below:
Actual user ID
Who are we actually?
Actual group ID
Valid user ID
Used to
Actual User ID (actual group ID): Identifies who the current user (belongs to) is and is taken from the password file when the user logs on.Valid user ID (valid group ID): Used to determine our (current process) access to the file (that is, the
Basic attributes of a process: process ID, parent process ID, process group ID, session, and control terminalAbstract:This document describes the basic attributes of a process, including process ID, parent process ID, process group ID, session, and
Basic attributes of a process: process ID, parent process ID, process group ID, session, and control terminal.Abstract:This document describes the basic attributes of a process, including process ID, parent process ID, process group ID, session, and
Every process has six or more IDs associated with it. These are shown in Figure 4.5.
Figure 4.5. user IDs and group IDs associated with each process
Real user IDReal group ID
Who we really are
Valid user IDValid
Process relationshipsCall format#include int Setpgid (pid_t pid, pid_t pgid);pid_t getpgid (pid_t pid);pid_t getpgrp (void); /* POSIX.1 version */pid_t getpgrp (psid_t pid); /* BSD version */int setpgrp (void); /* System V version */int Setpgrp
In UNIX systems,Privilege(For example, the expression of the current date and access control can be changed (for example, whether a specific file can be read or written ))Is based on the user ID and group ID. When the program needs to add privileges
Transfer from http://blog.csdn.net/todd911/article/details/16370577In UNIX systems, privileges are based on user and group IDs, and when programs need to add privileges or need access to resources that are not currently allowed, we need to replace
def Chaxun (groupid,items_value): Write it yourself, bring in the group ID and monitor the item key value, return the result of the host and the value. Make a judgment, if this host does not want to monitor the item, go to get rid
To log in to a computer, we need a username. A user name is an identity that can be recognized by a computer. Based on this, the computer applies a series of rules to people who log on with this user name. Under the Linux system, we can use the ID
The main function is # Include # Include Uid_t getuid ( Void ); Gid_t getgid ( Void ); Uid_t gettuid ( Void ); Gid_t getegid ( Void ); // Change ID Int Setuid (uid_t UID ); Int Setgid (gid_t GID ); // Exchange actual users and valid
Linux provides the setuid function and the Seteuid function to change the user ID associated with the process, and the process-related user ID has an "actual user ID, a valid user ID, and a saved settings user ID"=====================================
First, IntroductionWhen a process in a Linux system runs, it always accesses the resources of the system, accesses the files, or sends a signal to other processes. Does the system allow it to do these things? What is the system's ability to
To the fourth chapter, I do not know when to read the book, the delay too much time.The fourth chapter is based on the third chapter, mainly describes the other properties of the file system and the nature of the document.4.2 Stat, Fstat, Fstatat,
Environment variable Operation function
Char*getenv (const char* name); Get environment variable value
Intputenv (cahr* str); A string of name=value, put it in the environment table, and delete its original definition if name already
1, the file's attribute information:
1. Attribute structure body struct stat;
struct Stat {
mode_t st_mode; File type and access permission bit
ino_t St_ino; File I node number
dev_t
There are four process-related user IDs: Real, valid, saved, and file system user IDs.
A real ID is the ID of the user who starts the process.
A valid user ID is the user ID of a running process.
The saved ID is the initial valid user ID of the
The set of all system calls implemented by the operating system is the application programming interface (API ). Is the interface between applications and systems. Linux system calls include most common system calls and functions derived from system
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.