Question 271 of 511
System SecurityhardMultiple ChoiceObjective-mapped

Quick Answer

The answer is umask 026. This value prevents world-readable log files by subtracting from the default file creation base of 666, yielding permissions of 640 (rw-r-----), which removes read access for "others" while preserving group read access. On the LPIC-2 exam, this question tests your understanding of how umask interacts with file creation masks in security-sensitive directories like /var/log, where world-readable logs pose a data exposure risk. A common trap is confusing umask with chmod—remember that umask specifies what to deny, not what to grant. For system-wide application, the umask is set in a shell initialization file such as /etc/profile or /etc/bash.bashrc. A helpful memory tip: think "026 = Others get Zero read, Group gets 2 (write), Owner gets 6 (read+write)," or simply recall that to block world-read, the last digit of the umask must be at least 2.

LPIC-2 System Security Practice Question

This LPIC-2 practice question tests your understanding of system security. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A security audit reveals that the /var/log directory contains world-readable log files that may contain sensitive information. The administrator wants to ensure new files created in /var/log are not readable by others, without affecting existing file permissions. Which umask value should be set system-wide?

Question 1hardmultiple choice
Full question →

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

umask 026

Option D (umask 026) is correct because it sets the default permissions for new files to 640 (rw-r-----), which removes read access for 'others' while preserving read access for group members. The umask value is subtracted from the base permissions (666 for files), so a umask of 026 results in 666 - 026 = 640, meeting the requirement that new files in /var/log are not world-readable without altering existing file permissions.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • umask 027

    Why it's wrong here

    Results in 640 for files but 640 for directories? Actually 666-027=639, which is unusual.

  • umask 022

    Why it's wrong here

    Results in 644 (rw-r--r--), still world-readable.

  • umask 077

    Why it's wrong here

    Results in 600 (rw-------), too restrictive for logs.

  • umask 026

    Why this is correct

    Results in default file permissions 640 (rw-r-----).

    Related concept

    Read the scenario before looking for a memorised answer.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often choose umask 027 (option A) thinking it provides better security, but they overlook that it removes group read access, which can break legitimate log-reading processes, while the correct answer 026 preserves group read access and only removes world-read access.

Detailed technical explanation

How to think about this question

The umask is applied as a bitwise complement to the base permissions; for files, the base is typically 666 (rw-rw-rw-), and for directories, 777 (rwxrwxrwx). The umask value is subtracted from these bases, but note that the execute bit is not automatically set on files, so a umask of 026 yields 666 - 026 = 640 (rw-r-----), which is exactly rw-r----- for files. In practice, system-wide umask is set in /etc/profile, /etc/bashrc, or via pam_umask.so, and a common mistake is to use 027, which overly restricts group access, or 022, which leaves logs world-readable.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A network engineer segments a warehouse floor into three subnets: 20 scanners, 5 printers, and 2 management hosts. Picking the wrong mask wastes addresses or leaves too few usable hosts. Exam questions test whether you can apply CIDR notation, calculate block size, and identify the correct usable-host range for a given prefix.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related LPIC-2 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free LPIC-2 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this LPIC-2 question test?

System Security — This question tests System Security — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: umask 026 — Option D (umask 026) is correct because it sets the default permissions for new files to 640 (rw-r-----), which removes read access for 'others' while preserving read access for group members. The umask value is subtracted from the base permissions (666 for files), so a umask of 026 results in 666 - 026 = 640, meeting the requirement that new files in /var/log are not world-readable without altering existing file permissions.

What should I do if I get this LPIC-2 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This LPIC-2 practice question is part of Courseiva's free LPI certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LPIC-2 exam.