101-500 Exam QuestionsBrowse all questions from this exam

101-500 Exam - Question 80


Which of the following commands sets the SetUID permission on the executable /bin/foo?

Show Answer
Correct Answer: A

To set the SetUID permission on an executable, the correct command is to use chmod 4755 /bin/foo. The first digit '4' in '4755' sets the SetUID bit, while the remaining digits '755' set the standard read, write, and execute permissions for the owner, and read and execute permissions for group and others.

Discussion

3 comments
Sign in to comment
LazylinuxOption: A
Apr 22, 2022

For the special permissions, you prepend these numbers with another number where 4 is setuid, 2 is setgid, and 1 is the sticky bit

georgerobelOption: A
Dec 15, 2020

Correct answer is A.

NeoSam999Option: A
Jan 16, 2023

Correct Answer: A

NeoSam999
Jan 16, 2023

To set SUID: ~$ chmod 4755 test-SetUID ~$ ls -l test-SetUID -rwsr-xr-x 1 neo neo 0 jul 1 19:37 test-SetUID To remove it: ~$ chmod 0755 test-SetUID ~$ ls -l test-SetUID -rwxr-xr-x 1 neo neo 0 jul 1 19:20 test-SetUID