4.2 Per share definitions
Each share is denoted by a section starting with [sharename]. Common options for each share is listed as
follows.
- comment = Pictures
This defines a description of the share. It is not required, but it helps a user identify what a share is used for.
- browseable = yes
This specifies that the share shows up when a client attempts to browse the server. If a share is not browseable,
it remains “hidden” from any client that browses the machine. However, if a client knows the exact name of
the share, it can still connect to the share.
- writable = yes
This means a client can write to the share. You can specify no for this setting, which means the share remains
read-only.
- create mask = 0755
This is applicable only if a share is writable. This setting controls the default permissions of files created in the
share. 0755 specifies that the owner has full read/write/execute access, and all else (group and others) only
have read and execute access. This is the same as the octal settings for the command chmod.
- directory mask = 0755
This is applicable only if a share is writable. It specifies the permissions of directories created in the share.
- path = /what/ever
This specifies the path to the share.
- users = +smbusers
This specifies who can access this share. +smbusers specifies that all users in the SMB user group. You can
also specify individual usernames separated by commas. The + symbol indicates that smbusers is a group.
- group = smbusers
This specifies the group of a client for permission purposes. In this case, it means all clients connected to this
share assumes the groupname of smbusers. If a + symbol is used, that means the group name also acts as a
constraint. If +smbusers is used, that means only users who are already in the group smbusers can connect.
There is special share [homes]. This share specifies the home folder of the user who authenticates the connection. For
example, if user who authenticates is takumi, then the home share is set to ~takumi of the system, which is usually
/home/takumi. Naturally, the name of the share is takumi.