Courseiva
File Sharing and SambamediumMultiple ChoiceObjective-mapped

LPIC-2 File Sharing and Samba Practice 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

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?

⚠ Common exam trap

Many 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.

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.

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.

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.

  • 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.

About these practice questions

One of 507 original LPIC-2 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.