servedat Configuration File

On startup, servedat will attempt to load configuration information from one of several files.  On unix systems, /etc/servedat.cf and $HOME/.servedat.cf will be examined.  On Windows, the files %SystemRoot%\servedat.cf and any servedat.cf in the same directory as servedat.exe will be read.  Use command line option "-f" to specify a different configuration file.    Settings will be honored in the following increasing precedence: built-in defaults, %SystemRoot% or /etc config file, home or exe config file, with the command line options overriding all.

On unix systems, sending the HUP signal to a running servedat process will cause it to restart and reload all of its configuration settings.  Note that any active transactions will be immediately terminated by such a restart.

Each line consists of at most 127 characters of plain text.  Lines beginning with a hash, space, or tab are ignored.  All other lines have one of the following formats:

<variable>=<value> <variable> <value>

The second form ignores any leading white space in <value>.  Variable names are not case sensitive.  See the enclosed servedat.cf file for an example.  Following is a list of variables which may be set.  Many of these have corresponding command line options, described briefly in the previous section.  Not all variables may be available for all platforms or license types.

Aggression <-3 to 5>
[-a]  Advise MTP/IP as to how aggressive it should be in fully utilizing the network path.  Positive values may increase performance at the expense of third-party traffic.  Negative values may reduce path latency and allow better performance for other traffic, at the cost of reducing performance.  See the Performance section for details.

AllowEncrypt <1 or 0>
If set to 0, then encrypted transactions will be rejected.  See "Authentication" above and RequireEncrypt below.  Default: 1.

AuthFile <path name>
[-A]  Require credentials using the given authentication file.  Default: none.

Debug <level>
Enable logging of diagnostic messages.  Levels above 1 will produce copious output.

Expire <seconds>
[-e]  Sets how long servedat should wait without hearing from a client before it gives up and cancels a stalled transaction.  Longer values may be useful on highly unreliable networks.  Default: 40 seconds.

FileMode <octal>
[-MUnix only.  Sets the default file creation permissions.  This will be modified by the process umask.  Default: none.

HomeDir <path name>
Sets the default Home Directory path.  If SysAuth or AuthFile are set, then this will be overridden by the directory for the ANONYMOUS user.  Default: See Home Directories.

Interface <IP Address>
[-n]  Bind servedat to the given local network interface.  Default: none.

Latency <rtt>[:<rate>]
Advise MTP/IP of operation on a path with a high latency (over 500ms).  The first number is the minimum round trip time of the path, in milliseconds.  The second number, if present, advises the expected speed of the link (in kilobytes per second) and activates pipelining mode, which may result in faster throughput files on high-delay links.  This value is different from MaxRate, and should be a conservative (low) estimate.  Default: none.

LogFile <path name>
[-l]  Append log output to the named file path instead of stderr.  Default: See Errors & Logging.

LogFilter <level>
[-F]  Reduce the volume of server log output by filtering certain types of reports.  See Errors & Logging for values.  Default: 2.

MaxDatagram <bytes>
[-T]  Limit the size of network datagram payloads to no more than this amount.  The full IP datagram size will be 56 bytes larger when MTP/UDP/IP headers are included.  If your network is known to have problems with IP fragmentation, try setting a value of 1424 or smaller.  Default: none.

MaxRate <kilobytes per second>
[-k]  Set a limit on how fast each transaction can go.  Default: none.

MaxRTT <milliseconds>
Request that the path latency for each transaction be limited to the given amount of time.  This option may severely degrade performance.  Default: none.

MinRTT <milliseconds>
Advise MTP/IP as to the minimum latency of your network uplink.  See Latency above.  Default: none.

NoCompression <0 or 1>
[-Z]  Disables support for inline ZLIB compression (zli).  Default: 0.

NoOverwrite <0 or 1>
[-O]  Prevents incoming files from overwriting existing files.  Clients must delete an existing file prior to uploading one with the same name.  Default: 0.

Package <suffix>,"<command>" <options> "%s"
[-P]  Declare a package type and handler.  You may have multiple Package lines, one for each suffix.  Default: none.

PackTimeout <seconds>
[-E]  This sets an upper bound on how long a packaging utility is allowed to run.  It is intended as a safety check against runaway processes.  Default: none.

Port <UDP Port Number>
[-p]  Change the UDP port number used to listen for requests.  Use this option if there is a port conflict or you wish to take advantage of another UDP port that is already open in your firewall.  Default: 8080.

ReadOnly <0 or 1>
[-r]  Set to 1 to activate ReadOnly mode.  See "Access Privileges" above.  This can be set for individual users in the AuthFile.  Default: 0.

RestrictClients <0 or 1>
If set to 1, then only clients with a Site entry will be allowed to perform transactions with this server.  All other clients will be denied, regardless of their credentials.  Default: 0.

RequireEncrypt <0 or 1>
[-K]  If non-zero, then encryption will be required for all transactions.  Requests that are not encrypted will be rejected.  Default: 0.

RestrictHome <0 or 1>
[-H]  If non-zero, then users will not be allowed to directly access files outside their home directories.  Symbolic links will be honored.  This can be set for individual users in the AuthFile.  Default: 0.

ServedatConfigVersion 1
Verifies the format of the configuration file.  servedat will not run if this variable is not set correctly.

ShowDotFiles <0 or 1>
[-DUnix only.  Show file names beginning with a dot "." in directory listings.  By default, such files are hidden, but accessible.  Default: 0.

Site <address>[/bits] <Aggression> <MaxRate> <Expire> <MaxRTT> <Latency>
Configure performance for individual clients.  Address must be a DNS name, IP address, or subnet.  For subnets, use an address followed by a slash and the number of mask bits.  The remaining fields are white space separated and correspond to the named configuration variables.  A value of 0 implies that the default should be used.

If RestrictClients is set, then only those clients with Site declarations will be allowed to perform transactions.  You may have multiple Site declarations.  servedat will attempt to resolve DNS names when it first runs and will refresh them periodically.  If any DNS name cannot be resolved at startup, servedat will not run.  Default: none.

StreamSize <kilobytes>
[-b]  Set the buffer size for packaging commands.  The default is 2048 kilobytes, which is appropriate for links between 10 and 100 megabits per second.  Values up to 8192 may be useful on very fast links.  Default: 2048 kilobytes.

SysAuth <1 or 0>
[-S]  Use the system user database for authentication.  This is the default when running as root.  Anonymous access will be prohibited unless an ANONYMOUS entry is given in AuthFile.  Default: See SysAuth.