exam questions

Exam LFCS All Questions

View all questions & answers for the LFCS exam

Exam LFCS topic 1 question 94 discussion

Actual exam question from Linux Foundation's LFCS
Question #: 94
Topic #: 1
[All LFCS Questions]

Which of the following commands makes /bin/foo executable by everyone but writable only by its owner?

  • 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
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
KMAV
3 months ago
Selected Answer: B
The chmod command is used to change the permissions of a file or directory. The permissions of a file or directory are divided into three parts: owner, group, and others. Each part has three types of permissions: read, write, and execute. The first part of the chmod command specifies the permissions for the owner of the file (u for user). rwx means that the owner has read, write, and execute permissions. The second part specifies the permissions for the group of the file (g for group). rx means that the group has only read and execute permissions. The third part specifies the permissions for others (o for others). go= means that the group and others have no permissions. So, chmod u=rwx,go=rx /bin/foo sets the file permissions to read, write, and execute for the owner, read and execute for the group, and read and execute for others, making /bin/foo executable by everyone but writable only by its owner.
upvoted 1 times
KMAV
3 months ago
Sorry, I meant option A
upvoted 1 times
...
...
MoOshin
9 months, 3 weeks ago
Which of the following commands makes /bin/foo executable by everyone but writable only by its owner? This is a trick question, if you interpret is as the owner having just write permission, then none of the option is right, but if you interpret it as only the owner having write permission, then only option A meets that requirement.
upvoted 1 times
...
Funkslinger
1 year, 4 months ago
A is correct. user (u) is set to read (r), write (w), execute (x) group (g) & others (o) are set to read (r) and execute (x)
upvoted 1 times
...
0ldman
1 year, 10 months ago
Given answer is wrong. B is correct
upvoted 1 times
0ldman
1 year, 10 months ago
In fact even B is wrong as it doesn't mention the group
upvoted 1 times
Funkslinger
1 year, 4 months ago
A is the correct answer.
upvoted 1 times
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago