010-160 · Question #13
Which of the following permissions are set on the /tmp/ directory?
The correct answer is A. rwxrwxrwt. The /tmp directory is configured with rwxrwxrwt (octal 1777), granting full access to all users while the sticky bit prevents users from deleting each other's files.
Question
Options
- Arwxrwxrwt
- Brwx r-x
- CrwSrvW--
- DrwxrwS--
- Er-xr-X-t
How the community answered
(24 responses)- A92% (22)
- B4% (1)
- C4% (1)
Why each option
The /tmp directory is configured with rwxrwxrwt (octal 1777), granting full access to all users while the sticky bit prevents users from deleting each other's files.
rwxrwxrwt represents octal 1777 - full read, write, and execute permissions for owner, group, and others, plus the sticky bit (shown as 't') which restricts file deletion to the file owner only, making it safe for a world-writable shared temporary directory.
rwx r-x (755) grants write access only to the owner and lacks the sticky bit, so it cannot function as a world-writable shared temporary space.
rwSrvW-- is not a valid standard Linux permission string and has no corresponding octal representation or meaningful semantics in the Unix permissions model.
rwxrwS-- lacks execute permission for others and uses a capital S (setgid without execute) rather than the sticky bit, so it neither grants world-writable access nor protects users' files from deletion.
r-xr-X-t removes write permissions from owner and group, preventing any user from creating files in the directory, which contradicts the purpose of a shared temporary space.
Concept tested: Linux sticky bit and /tmp directory permissions
Source: https://www.man7.org/linux/man-pages/man1/chmod.1.html
Topics
Community Discussion
No community discussion yet for this question.