300-300 · Question #36
What is true about the Samba configuration options create mask?
The correct answer is D. Each permission bit that is cleared (0) in create mask is always cleared on a file created by. Option D is correct because create mask in Samba functions as a bitwise AND filter: when a file is created, its permissions are ANDed with the create mask, so any bit that is 0 in the mask will always produce a 0 in the result - those permission bits are unconditionally…
Question
Options
- AEach permission bit that is set (1) in create mask cannot be set on a file created by Samba
- BEach permission bit that is cleared (0) in create mask is only set on a file created by Samba if
- CEach permission bit that is set (1) in create mask is always set on a file created by Samba
- DEach permission bit that is cleared (0) in create mask is always cleared on a file created by
How the community answered
(56 responses)- A4% (2)
- B5% (3)
- C11% (6)
- D80% (45)
Explanation
Option D is correct because create mask in Samba functions as a bitwise AND filter: when a file is created, its permissions are ANDed with the create mask, so any bit that is 0 in the mask will always produce a 0 in the result - those permission bits are unconditionally stripped away.
Why the distractors are wrong:
- A reverses the logic - bits set to 1 in create mask are the allowed bits, not the blocked ones.
- B is wrong (and incomplete) - cleared (0) bits are always cleared, not conditionally set; there is no condition under which a 0-masked bit gets set.
- C is wrong because 1-bits in create mask are permissive, not mandatory - they allow a bit to be set if the underlying request includes it, but they don't force it. That forcing behavior belongs to
force create mode.
Memory tip: Think of create mask as a ceiling - 1 means "this bit is allowed through," 0 means "this bit is always blocked." If you need to force bits on, that's a different directive (force create mode).
Topics
Community Discussion
No community discussion yet for this question.