300-300 practice question 15 of 15

Which parameter within a share definition in the Samba configuration makes Samba only show files and directories on a file share which a user can access?

Full set: 53 questions
Answer options
A: hide unreadable = yes Correct answer
B: valid files = read,write
C: browse mask = 000
D: browseable = readable
E: display mode = 100
Correct Answer:
A. hide unreadable = yes
Explanation

The hide unreadable = yes parameter in a Samba share definition controls the visibility of files based on user permissions. When enabled, Samba checks if the user has read permissions for a file before including it in a directory listing. If the user cannot read the file, it will be hidden from them, effectively preventing them from seeing files and directories they cannot access. This is useful in environments where the existence of certain files should not be known to unauthorized users.

Why Incorrect

B. valid files = read,write is not a valid parameter in the Samba configuration file (smb.conf).
C. browse mask = 000 is not a recognized smb.conf parameter for controlling file visibility in directory listings.
D. The browseable parameter accepts boolean values (yes/no) to control share visibility, not file visibility. readable is an invalid value.
E. display mode = 100 is not a valid parameter within the Samba configuration schema.

References

1. Samba Official Documentation: The smb.conf(5) man page explicitly defines the hide unreadable parameter. It states, "If this parameter is set to yes, then if a user does not have read permissions for a file, they will not be able to see the file in directory listings."

Source: man smb.conf(5), section hide unreadable.

2. Red Hat Enterprise Linux 8 Documentation: In the guide for configuring Samba, the hide unreadable option is described as a method to prevent users from seeing files they do not have read permissions for.

Source: Red Hat Enterprise Linux 8 Documentation, "Configuring and managing file sharing", Chapter 8. "Setting Samba Share Parameters", Section 8.4. "Samba Share Parameter Descriptions".

3. The Official Samba-3 HOWTO and Reference Guide: This guide details share-level parameters, including hide unreadable.

Source: "The Official Samba-3 HOWTO and Reference Guide", Chapter 9, "Server-Side Automation", Section "hide unreadable". (Note: While for Samba-3, this core parameter's functionality remains consistent in later versions).

Scroll to Top