CompTIA Linux+ (XK0-005) — Question 118
A Linux administrator wants to set the SUID of a file named dev_team.text with 744 access rights. Which of the following commands will achieve this goal?
Answer options
- A. chmod 4744 dev_team.txt
- B. chmod 744 --setuid dev_team.txt
- C. chmod -c 744 dev_team.txt
- D. chmod -v 4744 --suid dev_team.txt
Correct answer: A
Explanation
The correct command is A, as 'chmod 4744' sets the SUID bit while granting the owner read, write, and execute permissions, and read permissions to the group and others. Options B, C, and D are incorrect because they either use invalid syntax for setting SUID or do not set it at all.