The Configuration File
Fusion File Share Server requires a configuration file that controls the behavior of the server and the shares it hosts.
Configuration File Location
By default, the configuration file is located at /etc/smb.conf. However, you can specify a different path for the file when starting the server by starting tsmb-server
with the -c
option.
In a clustered setup, the configuration file must reside on shared storage so that all nodes in the cluster have access to the same configuration.
Updating the Configuration File
Changes to the configuration file made during runtime are not applied until tsmb-server
is restarted. However, some configuration changes are possible while the server is running using the tsmb-cfg
command.
When using the tsmb-cfg
command, changes are not persisted across server restarts unless the server is started in persistent configuration mode (i.e. tsmb-server -p
).
Structure
The configuration file is written in an INI-like format, and is divided into sections:
-
This section must be the first section in the file. It contains configuration parameters that apply to the server as a whole, and often sets default behaviors for all shares.
The
[global]
section is terminated with[/global]
. -
The
[share]
sections:
Each share that the server hosts is represented by a[share]
section. These sections contain parameters that configure the name, path, and other behaviors of the share.Each
[share]
section is terminated with[/share]
.
Each line in the configuration file must be one of following:
- A section header:
[global]
or[share]
- A section footer:
[/global]
or[/share]
- A parameter line:
<parameter> = <value>
- A comment line:
# this is ignored
- A blank line.
Here's is an annotated example configuration file:
## Global must come first
[global]
# The type of the user database. `text` means a file-backed database
userdb_type = text
# The location of the user database file
userdb_file = /etc/tsmb-shadow
# The directory where the server stores its auxiliary and runtime files
runstate_dir = /var/lib/tsmb
# The network interfaces and ports the server listens on
listen = ANY,0.0.0.0,IPv4,445,DIRECT_TCP
# Continuous availability and scale-out, disabled for single-server setup
ca = false
scale_out = false
[/global]
# Share definition
[share]
# The name of the share, as visibile from the clients
netname = SH1
# A description of the share
remark = Test Share
# The path to the shared directory
path = /export/share1
# The permissions for the share
permissions = everyone:full
[/share]
# Another share definition
[share]
# The name of the share, as visibile from the clients
netname = SH2
# A description of the share
remark = Another Test Share
# The path to the shared directory
path = /export/share2
# The permissions for the share
permissions = everyone:full
[/share]