exam questions

Exam XK0-005 All Questions

View all questions & answers for the XK0-005 exam

Exam XK0-005 topic 1 question 158 discussion

Actual exam question from CompTIA's XK0-005
Question #: 158
Topic #: 1
[All XK0-005 Questions]

Which of the following commands is used to configure the default permissions for new files?

  • A. setenforce
  • B. sudo
  • C. umask
  • D. chmod
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
linux_admin
1 year, 3 months ago
Selected Answer: C
C. umask Explanation: umask is a command in Linux that sets the default file permissions for newly created files and directories. The default permissions are calculated by subtracting the umask value from 777 for files and 666 for directories. The result is the default permission for each bit (r, w, and x). For example, a umask value of 022 would result in file permissions of 644 (666 - 022) and directory permissions of 755 (777 - 022). Option A (setenforce) is used to set the enforcement mode of SELinux, the security module in Linux. It is not used to configure the default permissions for new files. Option B (sudo) is used to run commands with administrative privileges. It is not used to configure the default permissions for new files. Option D (chmod) is used to change the permissions of existing files and directories, but not to configure the default permissions for new files.
upvoted 2 times
Damon54
8 months, 3 weeks ago
The default permissions are calculated by subtracting the umask value from 777 for Directories and 666 for files
upvoted 1 times
...
...
Ckl22
1 year, 4 months ago
Selected Answer: C
C is correct The user mask (umask) feature defines the default permissions Linux assigns to the file or directory. The user mask is an octal value that represents the bits to be removed from the octal mode 666 permissions for files or the octal mode 777 permissions for directories.
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago