Linux process

[Linux process]

Two processes

The real user ID </ strong> is the user who started the process and the owner of the process.

The effective user ID </ strong> is the user who has authority when the process is executed. (The kernel determines the process execution authority based on the effective user ID and effective group ID.)

SUID and SGID

SUID (Set User ID) </ strong> means that the effective user ID is the file owner ID regardless of which user executes it. Grant "4000" or owner (u) + "s" to permissions

Example) / usr / bin / passwd

For SGID (Set Group ID) </ strong>, the group ID of the file is the effective group ID. Grant "2000" or group (g) + "s" to permissions

  • If you create a file or directory under the directory where SGID is set, the group of directories for which SGID is set will be inherited and set.

Sticky bit

Files and directories under the directory where the sticky bit </ strong> is set can be renamed and deleted only by the owner and root user, regardless of the actual access rights. When specifying with the chmod command, add "1000" or other user (o) + "t"

Q) Which directory has the sticky bit generally set? (Already set) A) / tmp

Recommended Posts