nerdexam
Linux_Foundation

LFCS · Question #720

You want the default permissions for your files to bE.rw-r-. How must you set umask?

The correct answer is A. 037. The umask value determines the default permissions for newly created files by specifying which permission bits are removed from the default mask of 666.

Submitted by mateo_ar· Apr 18, 2026User and Group Management

Question

You want the default permissions for your files to bE.rw-r-. How must you set umask?

Options

  • A037
  • B640
  • C038
  • D027

How the community answered

(34 responses)
  • A
    76% (26)
  • B
    12% (4)
  • C
    9% (3)
  • D
    3% (1)

Why each option

The `umask` value determines the default permissions for newly created files by specifying which permission bits are removed from the default mask of 666.

A037Correct

To achieve `rw-r-----` (octal 640) for files, the `umask` must remove no permissions for the owner (0), remove write and execute for the group (3), and remove all permissions (read, write, execute) for others (7). Applying `umask 037` to the default file permissions of `rw-rw-rw-` (666) results in `rw-r-----` (640).

B640

`640` represents the desired file permissions, not the `umask` value used to achieve them.

C038

`038` is an invalid octal `umask` value because '8' is not a valid octal digit.

D027

While `umask 027` would also result in `rw-r-----` (640) for files, it specifies removing only the write permission for the group (2) as opposed to write and execute (3) provided by `037`.

Concept tested: Umask permissions calculation

Source: https://man7.org/linux/man-pages/man1/umask.1.html

Topics

#umask#file permissions#octal permissions#default permissions

Community Discussion

No community discussion yet for this question.

Full LFCS Practice