nerdexam
LPI

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.

Security and File Permissions

Question

Which of the following permissions are set on the /tmp/ directory?

Options

  • Arwxrwxrwt
  • Brwx r-x
  • CrwSrvW--
  • DrwxrwS--
  • Er-xr-X-t

How the community answered

(24 responses)
  • A
    92% (22)
  • B
    4% (1)
  • C
    4% (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.

ArwxrwxrwtCorrect

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.

Brwx r-x

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.

CrwSrvW--

rwSrvW-- is not a valid standard Linux permission string and has no corresponding octal representation or meaningful semantics in the Unix permissions model.

DrwxrwS--

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.

Er-xr-X-t

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

#sticky bit#/tmp directory#special permissions

Community Discussion

No community discussion yet for this question.

Full 010-160 Practice