What do the permissions -rwSr-xr-x mean for a binary file when it is executed as a command?



A. The command is SetUID and it will be executed with the effective rights of the owner.
B. The command will be executed with the effective rights of the group instead of the owner.
C. The execute flag is not set for the owner. Therefore the SetUID flag is ignored.
D. The command will be executed with the effective rights of the owner and group.

題解

當「s」出現在擁有者的執行權限時,表示這個檔案擁有SUID(SetUID)的作用,SUID可以讓任何使用者執行這個檔案的時候都能有這個檔案的擁有者權限。「S」表示檔案擁有SUID(SetUID)的作用,但擁有者並沒有檔案的執行權限,而「s」才是擁有者有檔案的執行權限,因此這題答案是選項C。