suid&&sgid
来源:互联网 发布:产业大数据平台 编辑:程序博客网 时间:2024/06/04 22:15
When we execute a program file, the effective user ID of the process is usually the real user ID, and the effective group ID is usually the real group ID. But the capability exists to set a special flag in the file's mode word (st_mode) that says "when this file is executed, set the effective user ID of the process to be the owner of the file (st_uid)." Similarly, another bit can be set in the file's mode word that causes the effective group ID to be the group owner of the file (st_gid). These two bits in the file's mode word are called the set-user-ID bit and the set-group-ID bit.
For example, if the owner of the file is the superuser and if the file's set-user-ID bit is set, then while that program file is running as a process, it has superuser privileges. This happens regardless of the real user ID of the process that executes the file. As an example, the UNIX System program that allows anyone to change his or her password, passwd(1), is a set-user-ID program. This is required so that the program can write the new password to the password file, typically either /etc/passwd or /etc/shadow, files that should be writable only by the superuser. Because a process that is running set-user-ID to some other user usually assumes extra permissions, it must be written carefully.
For example, if the owner of the file is the superuser and if the file's set-user-ID bit is set, then while that program file is running as a process, it has superuser privileges. This happens regardless of the real user ID of the process that executes the file. As an example, the UNIX System program that allows anyone to change his or her password, passwd(1), is a set-user-ID program. This is required so that the program can write the new password to the password file, typically either /etc/passwd or /etc/shadow, files that should be writable only by the superuser. Because a process that is running set-user-ID to some other user usually assumes extra permissions, it must be written carefully.
- SUID、SGID
- suid&&sgid
- SUID SGID
- SUID SGID
- 关于Suid和Sgid
- SUID SGID stickybit
- SUID,SGID,SBIT
- SUID、SGID、STICKY简介
- Linux中的SUID/SGID
- SUID 与SGID
- UID,GID,SUID,SGID
- SUID SGID STICKY
- Linux : SUID SGID
- Linux : SUID SGID
- linux:SUID、SGID详解
- suid sgid sticky
- linux:SUID、SGID详解
- Linux SUID SGID 详解
- 学习Linux的几点忠告(转自Ubuntu中文论坛)
- [HDU4786]Fibonacci Tree
- how to remove software on ubuntu
- Finding Software
- 单例模式 Singleton
- suid&&sgid
- [安卓开发]C4Droid:在手机上直接编程,然后导出为apk
- LTE 网络基础总结
- Java基础知识整理(七)- setDaemon()
- Linux信号、对应的值以及解释
- 使用MATLAB学习模电-002
- LINUX CAT(concatenate)结合多个文件并输出到标准输出设备
- LINUX cd切换目录
- XML CDATA