Question 130 of 511
File Sharing and SambamediumMultiple ChoiceObjective-mapped

Quick Answer

The answer is the global `create mask = 0700` setting, which restricts newly created files to owner-only permissions, overriding the 777 filesystem permissions. Even though `/srv/samba/shared` is set to 777, Samba applies the create mask when a file is written, and if the connecting user is mapped to a default account like `nobody`, that user is not the file owner, so the 0700 mask blocks write access entirely. On the LPIC-2 exam, this scenario tests your understanding of how Samba’s parameter precedence works—specifically that `create mask` and `directory mask` can silently override seemingly permissive filesystem permissions, a common trap where candidates assume 777 guarantees write access. The key insight is that Samba enforces its own permission layer on top of the filesystem, and a restrictive mask combined with a default user mapping will prevent writes even with `read only = no`. Memory tip: “Mask before filesystem”—Samba’s create mask is applied first, so 777 on disk means nothing if the mask says 0700.

LPIC-2 File Sharing and Samba Practice Question

This LPIC-2 practice question tests your understanding of file sharing and samba. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. 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.

Exhibit

Refer to the exhibit.

[global]
   workgroup = WORKGROUP
   server string = %h server (Samba, Ubuntu)
   security = user
   map to guest = Bad User
   log file = /var/log/samba/log.%m
   max log size = 1000
   load printers = Yes
[printers]
   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   guest ok = yes
   read only = yes
   create mask = 0700
[shared]
   path = /srv/samba/shared
   browseable = yes
   read only = no
   guest ok = yes

Refer to the exhibit. A user reports that they can connect to the 'shared' share from a Windows client and read files, but cannot write any files. The share permissions on the filesystem are set to 777 on /srv/samba/shared. What is the most likely cause of the write failure?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "most likely"

    Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

Question 1mediummultiple choice
Full question →

Exhibit

Refer to the exhibit.

[global]
   workgroup = WORKGROUP
   server string = %h server (Samba, Ubuntu)
   security = user
   map to guest = Bad User
   log file = /var/log/samba/log.%m
   max log size = 1000
   load printers = Yes
[printers]
   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   guest ok = yes
   read only = yes
   create mask = 0700
[shared]
   path = /srv/samba/shared
   browseable = yes
   read only = no
   guest ok = yes

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

The global 'create mask = 0700' restricts the permissions of newly created files, and the share is using a default user with no write permission.

Option B is correct because the global `create mask = 0700` setting in the Samba configuration restricts the permissions of newly created files to owner-only read/write/execute. When a user connects to the share, Samba maps them to a default user (e.g., `nobody` or `guest`) if no specific user mapping is configured. Since the default user is not the owner of the files, the 0700 mask prevents write access, even though the filesystem permissions on `/srv/samba/shared` are 777. The `read only = no` in the share definition allows writes in principle, but the create mask overrides the effective permissions for file creation.

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.

  • The 'guest ok = yes' parameter prevents writes for authenticated users.

    Why it's wrong here

    Incorrect. Guest ok allows guest access but does not prevent authenticated writes.

  • The global 'create mask = 0700' restricts the permissions of newly created files, and the share is using a default user with no write permission.

    Why this is correct

    Correct. The create mask applies to all shares, and if the user does not match the owner, they may not have write access to new files.

    Clue confirmation

    The clue word "most likely" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

  • The 'read only = no' parameter is overridden by the 'printable = yes' in the printers share.

    Why it's wrong here

    Incorrect. The shared share is separate; read only = no allows writes.

  • The 'browseable = yes' parameter prevents writing by design.

    Why it's wrong here

    Incorrect. Browseable controls visibility, not write access.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates assume filesystem permissions (777) alone guarantee write access, overlooking how Samba's `create mask` and `force user` settings can silently restrict effective permissions at the protocol level.

Detailed technical explanation

How to think about this question

Samba's `create mask` is applied as a bitwise AND with the requested file permissions, effectively limiting the maximum permissions a new file can have. Even with filesystem permissions set to 777, if the Samba `create mask` is 0700, new files will be created with at most 0700 (owner-only access). In a real-world scenario, this often occurs when administrators set restrictive masks globally for security but forget to override them per share, causing unexpected write failures for non-owner users. The `force user` or `force group` parameters can be used to map all connections to a specific user/group to bypass this issue.

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?

File Sharing and Samba — This question tests File Sharing and Samba — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: The global 'create mask = 0700' restricts the permissions of newly created files, and the share is using a default user with no write permission. — Option B is correct because the global `create mask = 0700` setting in the Samba configuration restricts the permissions of newly created files to owner-only read/write/execute. When a user connects to the share, Samba maps them to a default user (e.g., `nobody` or `guest`) if no specific user mapping is configured. Since the default user is not the owner of the files, the 0700 mask prevents write access, even though the filesystem permissions on `/srv/samba/shared` are 777. The `read only = no` in the share definition allows writes in principle, but the create mask overrides the effective permissions for file creation.

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.

Are there clue words in this question I should notice?

Yes — watch for: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

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.