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.
answer is A
No,answer is C –>The execute flag is not set for the owner. Therefore the SetUID flag is ignored.AS you see -rwSr-xr-x , the SetUID flag is set to capital s(S) which means that the execution flag is not set,therefor the SetUID is ignored
It is Answer A.
Demo:
tty1:
jan@ubuntu1604:~$ ls -l a.out
> -rwSr-xr-x 1 root jan 13920 Mär 5 19:37 ./a.out
jan@ubuntu1604:~$ ./a.out
> Bitte eine Zahl eingeben:
tty2:
jan@ubuntu1604:~$ pgrep a.out | xargs ps l
> F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND
> 0 0 6980 5182 20 0 13268 1552 – S+ pts/1 0:00 ./a.out
As you can see it is uid 0, and we all that’s ruth