nerdexam
CompTIA

XK0-005 · Question #866

A Linux administrator is changing the default system umask. The newly created files should have the -rw-r----- permission, and the newly created directories should have the drwxr----x permission…

The correct answer is C. umask 0037. The umask value subtracts permission bits from the system defaults (- files: 0666, directories: With umask 0036 (octal): - Files get 0666 & ~0036 = 0640 → -rw-r----- - Directories get 0777 & ~0036 = 0741 → drwxr----x None of the other umask values produce both of these target…

System Management

Question

A Linux administrator is changing the default system umask. The newly created files should have the -rw-r----- permission, and the newly created directories should have the drwxr----x permission. Which of the following commands should the administrator use?

Options

  • Aumask 0035
  • Bumask 0036
  • Cumask 0037
  • Dumask 0038

How the community answered

(20 responses)
  • A
    15% (3)
  • B
    10% (2)
  • C
    70% (14)
  • D
    5% (1)

Explanation

The umask value subtracts permission bits from the system defaults (- files: 0666, directories: With umask 0036 (octal): - Files get 0666 & ~0036 = 0640 → -rw-r----- - Directories get 0777 & ~0036 = 0741 → drwxr----x None of the other umask values produce both of these target permissions.

Topics

#umask#File Permissions#Octal Permissions#Access Control

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice