Which of the following commands sets the SetUID permission on the executable /bin/foo?
A. chmod 4755 /bin/foo
B. chmod 1755 /bin/foo
C. chmod u-s /bin/foo
D. chmod 755+s /bin/foo
E. chmod 2755 /bin/foo
Which of the following commands sets the SetUID permission on the executable /bin/foo?
A. chmod 4755 /bin/foo
B. chmod 1755 /bin/foo
C. chmod u-s /bin/foo
D. chmod 755+s /bin/foo
E. chmod 2755 /bin/foo
For the special permissions, you prepend these numbers with another number where 4 is setuid, 2 is setgid, and 1 is the sticky bit.
https://www.liquidweb.com/kb/how-do-i-set-up-setuid-setgid-and-sticky-bits-on-linux/
You need to know how to read groups and how to calculate the permission.
https://chmodcommand.com/chmod-4755/
Play with SetUID and SetGID and it should dawn on you how it works.
Also here is a good video with how it works and calculate without the User ID (UID) and Group ID (GID)