nerdexam
CompTIA

XK0-005 · Question #767

A Linux administrator needs to set the permissions on a server. The administrator wants to have the files within the directory set to read-write permissions and the directory set to read-write…

The correct answer is D. umask 0077. Setting the umask to 0077 causes new directories to be created with 0777–0077 = 0700 (rw‑x only for the owner) and new files with 0666–0077 = 0600 (rw only for the owner), which matches the requirement of read/write on files and read/write/execute on the directory.

System Management

Question

A Linux administrator needs to set the permissions on a server. The administrator wants to have the files within the directory set to read-write permissions and the directory set to read-write- execute permissions. Which of the following commands should the administrator use?

Options

  • Achmod 0022
  • Bchown 0027
  • Csetfacl 0007
  • Dumask 0077

How the community answered

(49 responses)
  • A
    8% (4)
  • B
    4% (2)
  • C
    2% (1)
  • D
    86% (42)

Explanation

Setting the umask to 0077 causes new directories to be created with 0777–0077 = 0700 (rw‑x only for the owner) and new files with 0666–0077 = 0600 (rw only for the owner), which matches the requirement of read/write on files and read/write/execute on the directory.

Topics

#umask#File Permissions#Directory Permissions#Linux Administration

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice