What do the permissions -rwSr-xr-x mean for a binary file when it is executed as a command?
What do the permissions -rwSr-xr-x mean for a binary file when it is executed as a command?
The permissions -rwSr-xr-x mean that the file has read and write permissions for the owner, and read and execute permissions for the group and others. The 'S' in the owner's execution place indicates the SetUID (Set User ID) bit is set, but the owner's execute bit is not. Despite the lack of the owner's execute bit, the SetUID flag causes the command to be executed with the effective rights of the owner. This means that even though the owner does not have execute permission, the SetUID ensures the binary executes with owner's permissions.
When the setuid bit is used an executable is not run with the privileges of the user who launched it, but with that of the file owner instead. Correct Answer: A
The right answer is A: The command is SetUID and it will be executed with the effective rights of the owner. The EFFECTIVE rights (which in this case are euqal to none, but nevertheless). the SetUID is NOT ignored