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 116 discussion

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

Which of the following commands set the sticky bit for the directory /tmp? (Choose TWO correct answers.)

  • A. chmod +s /tmp
  • B. chmod +t /tmp
  • C. chmod 1775 /tmp
  • D. chmod 4775 /tmp
  • E. chmod 2775 /tmp
Show Suggested Answer Hide Answer
Suggested Answer: BC 🗳️

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: BD
The correct answers are: B. chmod +t /tmp D. chmod 4775 /tmp Explanation: The sticky bit is a special permission flag that can be set on directories. When applied to a directory, it modifies the behavior of file deletion within that directory. Specifically, it restricts the deletion of files within the directory to: The owner of the file The owner of the directory The superuser (root) The correct commands: chmod +t /tmp: This uses the symbolic mode to add (+t) the sticky bit to the /tmp directory. chmod 4775 /tmp: This uses the octal mode representation, where 4 corresponds to the sticky bit (1000 in binary), and 775 are the standard permissions for the directory (rwxrwxr-x). Incorrect commands: A. chmod +s /tmp: This sets the setuid bit, not the sticky bit. C. chmod 1775 /tmp: This sets the sticky bit (1) but also the setuid bit (4), which is usually not desired for the /tmp directory. E. chmod 2775 /tmp: This sets the setgid bit (2), not the sticky bit.
upvoted 1 times
9866666
1 week, 5 days ago
The correct answers are: B. chmod +t /tmp D. chmod 1777 /tmp The sticky bit is represented by the octal digit 1 in the permissions, not 4 as I mistakenly stated.
upvoted 1 times
...
...
EliteAllen
6 months ago
Selected Answer: BC
B. chmod +t /tmp C. chmod 1775 /tmp The sticky bit is a permission bit that makes a directory such that only the owner of the file within those directories can delete or rename the files. The symbolic method to set the sticky bit is with +t and the octal method is with a leading 1 in the four-digit octal representation.
upvoted 1 times
...
peppiniello
7 months, 2 weeks ago
Selected Answer: BC
chmod 1777 dir chmod +t dir
upvoted 1 times
...
ARH2023
7 months, 4 weeks ago
The correct commands to set the sticky bit for the directory /tmp are: C. chmod 1775 /tmp E. chmod 2775 /tmp Both of these commands set the sticky bit on the /tmp directory. The sticky bit is represented by the number 1 in the first digit of the permission mode (i.e., as the most significant bit in the digit). Option A (chmod +s /tmp) sets the setuid (SUID) bit, not the sticky bit. Option B (chmod +t /tmp) is not a valid way to set the sticky bit. Option D (chmod 4775 /tmp) sets the SUID bit and the group-execute permission, but it doesn't set the sticky bit. So, options C and E are the correct ones for setting the sticky bit on the /tmp directory.
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