Set UID
When the s flag appears on the X permission of the file owner, for example, the permission status of the file/usr/bin/passwd just mentioned: "-RWSR-XR-X "is called set UID, which is short for SUID special permission. So what is the special
In a Linux system, sometimes when a command is executed, another file needs to be manipulated, and the file to be made is not an ordinary user with permission to operate. For example, to modify the user password passwd, the command file owner and
From: http://fanqiang.chinaunix.net/a1/b5/20010808/1000001088.html
I. SUID/SGID Overview
Sometimes, an unauthorized user needs to complete a task. One example is the passwd program, which allows the user to change the password, which requires
Introduction to special permissions set UIDWhen s this flag appears on the file owner's X permission, such as/usr/bin/passwd the permission state of this file: "-rwsr-xr-x.", this is called the set UID, referred to as suid. So what is the specific
SUID shell is a shell that can be run with the permission of the owner. That is to say, if the owner is root, you may execute the command as root. The attribute of a common shell file is rwxr-XR-X, the owner is root, and root reads/writes/executes
Files in addition to the general permissions R, W, X also have some special permissions, S and T permissions, the specific use of the following 1 SetUIDWhen s this flag appears on the file owner's X-permission, such as/USR/BIN/PASSWD,[Email
I wrote a script quit.sh, as follows:1 #/bin/bash2 If [$#-lt 1];then3 echo "must input at least one parameter!"4 Exit 15 fi67 if [= = "Q"];then8 echo "quit!"9 echo "$ (WhoAmI) quit @ $ (date)" >>/tmp/quit.txt #这里访问了quit. txtExit 0One elseecho "Wrong
Everyone knows file and directory permissions The most common are three. Readable (R). Writable (W) ... Executable (x) ... Their levels are 4, respectively. 2..1. We also sometimes find that some files belong to the owner with a flag bit of s on it.
A file with Suid permissions in a Linux system makes people love and hate. The benefit of suid is that you can at some point allow the user to perform certain files that can only be executed by root (such as passwd,ping,mount, etc.), and the
1, suid and Sgid are for the binary program, bash script is not its scope.2, if a binary file is set to Suid, then when the UserA user executes it, it will be executed as the identity of the user who owns the file. Sgid;3, Suid priority than Sgid,
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.