LPIC-2 File Sharing and Samba Practice Question
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?
⚠ Common exam trap
Test-takers frequently 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.
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 read only = yes parameter forces read-only access.
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.
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.
- ✗
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.
Go deeper
Related to this question
About these practice questions
This LPIC-2 question is part of Courseiva's 507-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.