Linux Foundation Certified System Administrator (LFCS) — Question 140
Which of the following commands makes /bin/foo executable by everyone but writable only by its owner?
Answer options
- A. chmod u=rwx,go=rx /bin/foo
- B. chmod o+rwx,a+rx /bin/foo
- C. chmod 577 /bin/foo
- D. chmod 775 /bin/foo
Correct answer: A
Explanation
The command chmod u=rwx,go=rx /bin/foo grants read, write, and execute permissions to the owner, and read and execute permissions to group and others. The other options either give write permission to others or do not restrict write access appropriately, making them incorrect.