This LPIC-2 practice question tests your understanding of file sharing and samba. 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.
Exhibit
Refer to the exhibit.
Partial output of testparm -v:
[global]
workgroup = EXAMPLE
server string = Samba File Server
security = USER
map to guest = Bad User
guest account = nobody
[public]
path = /srv/samba/public
browseable = yes
read only = yes
guest ok = yes
create mask = 0755
A client reports that the [public] share is visible but all files appear read-only. What is the cause?
Refer to the exhibit.
Partial output of testparm -v:
[global]
workgroup = EXAMPLE
server string = Samba File Server
security = USER
map to guest = Bad User
guest account = nobody
[public]
path = /srv/samba/public
browseable = yes
read only = yes
guest ok = yes
create mask = 0755
A
The create mask = 0755 denies write permissions.
Why wrong: Create mask affects new files, but read only = yes overrides.
B
The read only = yes parameter forces read-only access.
Setting read only = yes makes the share read-only regardless of other permissions.
C
The guest account nobody has no write permission on the file system.
Why wrong: Even with write permission on filesystem, read only = yes will enforce read-only.
D
The map to guest = Bad User is causing all users to be treated as guest.
Why wrong: Guest users still get read-only if share is read only = yes.
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The read only = yes parameter forces read-only access.
Option B is correct because the `read only = yes` parameter in a Samba share definition explicitly forces all files to appear read-only to clients, regardless of underlying filesystem permissions. This overrides any other permission settings and is the direct cause of the reported behavior where the share is visible but all files are read-only.
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 create mask = 0755 denies write permissions.
Why it's wrong here
Create mask affects new files, but read only = yes overrides.
✓
The read only = yes parameter forces read-only access.
Why this is correct
Setting read only = yes makes the share read-only regardless of other permissions.
Related concept
Read the scenario before looking for a memorised answer.
✗
The guest account nobody has no write permission on the file system.
Why it's wrong here
Even with write permission on filesystem, read only = yes will enforce read-only.
✗
The map to guest = Bad User is causing all users to be treated as guest.
Why it's wrong here
Guest users still get read-only if share is read only = yes.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates often confuse filesystem permissions (like write bits or ACLs) with Samba share-level parameters, assuming that if the guest account lacks write permission, files would appear read-only, when in fact Samba reports the read-only status based on the `read only` parameter, not the guest account's filesystem rights.
Detailed technical explanation
How to think about this question
In Samba, the `read only` parameter (or its alias `writable = no`) is evaluated at the protocol level during SMB negotiate and tree connect responses, telling the client that the share is read-only. This overrides any `create mask`, `directory mask`, or filesystem ACLs because the client enforces the read-only flag locally, preventing write operations before they reach the server. A real-world scenario is when an administrator sets `read only = yes` for a backup share to prevent accidental modifications, even though the underlying filesystem allows writes.
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.
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 read only = yes parameter forces read-only access. — Option B is correct because the `read only = yes` parameter in a Samba share definition explicitly forces all files to appear read-only to clients, regardless of underlying filesystem permissions. This overrides any other permission settings and is the direct cause of the reported behavior where the share is visible but all files are read-only.
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 →
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.
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.
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.
Sign in to join the discussion.