nerdexam
Linux_Foundation

LFCS · Question #784

An administrator wants the default permissions for their files to be -rw-r-----. How must the administrator set umask?

The correct answer is D. 027. To achieve default file permissions of -rw-r-----, which is octal 640, an administrator must set the umask to 027 to mask out write permission for the group and all permissions for others.

Submitted by klara.se· Apr 18, 2026User and Group Management

Question

An administrator wants the default permissions for their files to be -rw-r-----. How must the administrator set umask?

Options

  • A037
  • B640
  • C038
  • D027

How the community answered

(39 responses)
  • A
    3% (1)
  • B
    8% (3)
  • C
    15% (6)
  • D
    74% (29)

Why each option

To achieve default file permissions of -rw-r-----, which is octal 640, an administrator must set the umask to 027 to mask out write permission for the group and all permissions for others.

A037

A umask of 037 would result in file permissions of 630 (rw- -wx ---), which is not the desired -rw-r-----.

B640

640 represents the desired file permissions, not the umask value; the umask specifies permissions to be *removed* from the default.

C038

038 is an invalid octal number because '8' is not a valid octal digit, making it an impossible umask setting.

D027Correct

The default permissions for a new file are typically 666 (rw-rw-rw-). To achieve 640 (rw-r-----), the umask must remove `w` (2) from the group and `rwx` (7) from others. Therefore, 666 - 027 = 640, or more accurately, 666 AND (NOT 027) = 640.

Concept tested: Linux umask and default file permissions

Source: https://man7.org/linux/man-pages/man2/umask.2.html

Topics

#umask#File permissions#Default permissions#Access control

Community Discussion

No community discussion yet for this question.

Full LFCS Practice