[user@host]$ gcc -Wall -o process process.c # 编译 [user@host]$ ls -l process* -rwxr-xr-x. 1 root root 24760 Apr 9 22:09 process -rw-r--r--. 1 kiosk kiosk 1994 Apr 9 22:09 process.c [user@host]$ [user@host]$ sudo chown root:root process [user@host]$ sudo chmod +sx process # 设置 SUID 和 SGID 权限 [user@host]$ -rwsr-sr-x. 1 root root 24760 Apr 9 22:09 process [user@host]$ ./process |
[user@host]$ sudo chmod g-s process # 去除 SUID 权限 [user@host]$ -rwxr-sr-x. 1 root root 24760 Apr 9 22:09 process [user@host]$ ./process |
|