Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam LFCS topic 1 question 119 discussion

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

What do the permissions -rwSr-xr-x mean for a binary file when it is executed as a command?

  • A. The command is SetUID and it will be executed with the effective rights of the owner.
  • B. The command will be executed with the effective rights of the group instead of the owner.
  • C. The execute flag is not set for the owner. Therefore the SetUID flag is ignored.
  • D. The command will be executed with the effective rights of the owner and group.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
9866666
1 week, 5 days ago
Selected Answer: C
The correct answer is: C. The execute flag is not set for the owner. Therefore the SetUID flag is ignored. Here's a more detailed explanation: SetUID (Set User ID): This bit allows a file to be executed with the permissions of the file owner, rather than the permissions of the user executing it. However, for this to work, the file must also have the execute permission set for the owner. Execute Permission: This permission allows a file to be executed as a program. In the given permissions (-rwSr-xr-x), the execute permission is not set for the owner (indicated by the hyphen in the first position). Therefore, even though the SetUID bit is set (indicated by the 'S'), the command will not be executed with the effective rights of the owner. It will be executed with the permissions of the user who runs it.
upvoted 1 times
...
EliteAllen
6 months ago
Selected Answer: C
C. The execute flag is not set for the owner. Therefore the SetUID flag is ignored. The S in the permissions indicates that the execute bit is not set; therefore, even though the SetUID bit is present, it will not have any effect when the command is executed.
upvoted 1 times
...
rona962
1 year, 2 months ago
Selected Answer: A
The permissions -rwSr-xr-x for a binary file mean that the command is SetUID and it will be executed with the effective rights of the owner. The capital "S" in the permissions indicates that the SetUID bit is set, which means that when the binary file is executed, it will run with the permissions of the owner of the file, rather than the permissions of the user executing the command. The lowercase "s" in the permissions indicates that the SetGID bit is set, but since it is in the "others" category, it does not apply here. The x flag is set for the group and others, which means that they have execute permission for the file. However, the owner of the file does not have execute permission, which means that they cannot execute the file directly, but they can still execute it through the SetUID mechanism.
upvoted 1 times
rona962
1 year, 2 months ago
Option B is not correct because the group does not have any special permission set (e.g., SetGID bit is not set), and even if it had, it would not affect the SetUID bit. The SetUID bit only affects the permissions of the owner of the file, not the group. Option C is not correct because even though the execute flag is not set for the owner, the SetUID bit is still honored when the file is executed. The SetUID bit overrides the lack of execute permission for the owner. Option D is not correct because the group does not have any special permission set that would allow it to execute the file with elevated permissions. The command will only be executed with the effective rights of the owner due to the SetUID bit.
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 ...
ex Want to SAVE BIG on Certification Exam Prep?
close
ex Unlock All Exams with ExamTopics Pro 75% Off
  • arrow Choose From 1000+ Exams
  • arrow Access to 10 Exams per Month
  • arrow PDF Format Available
  • arrow Inline Discussions
  • arrow No Captcha/Robot Checks
Limited Time Offer
Ends in