LPIC-1 Exam 101 v5 (Linux Administrator) — Question 49
Which of the following commands sets the SetUID permission on the executable /bin/foo?
Answer options
- 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
Correct answer: A
Explanation
The correct answer is A, as the command 'chmod 4755 /bin/foo' sets the SetUID permission by using the leading '4'. Answer B incorrectly uses '1' which signifies a sticky bit. Answer C removes the SetUID permission, while D and E do not properly set it either.