Home Directories

The server can provide remote access to files contained in one or more directories.  Depending on how servedat is configured, users may be limited to a single directory, or they may have access to the entire filesystem.

A Home Directory is the base folder that a user accesses when only a relative pathname is given (one that doesn't start with a '/').  Users can generally access all the files and sub-directories in their Home Directory.  Whether or not a user can access files outside their Home Directory depends on the type of user, the server's RestrictHome setting, and the user's AuthFile options.

System User Homes

System Users will be given access to their normal home directory as specified by the operating system.  If RestrictHome is disabled, System Users can also access the entire file system by using absolute pathnames (paths starting with a '/').

AuthFile Homes

Users listed in an AuthFile are placed in the home directory specified there.  If no home directory is specified, they revert to the Default Home, described below.

Normally, AuthFile users are given full access to the file system, just like System Users.  This can be restricted by using the RestrictHome option in the AuthFile or server configuration file.  An exception exists for the username "ANONYMOUS" which is always restricted to its home directory.

Default Home

If a user is listed in the AuthFile without a home directory, or the user is anonymous and there is no AuthFile or SysAuth, then the client is given access to the server's Default Home.  The Default Home can be specified in three ways:

Command Line
List the Default Home as the last argument of the servedat command line.  For example, typing "servedat /home/me/mysubdir" will set /home/me/subdir as the Default Home.

HomeDir Variable
You can also set the Home Directory by using the HomeDir variable in a configuration file.  The command line setting will override the configuration file setting.

Default
If no Default Home is given on the command line or in a configuration file, then the current working directory of the servedat process will be used.  If you double click on servedat.exe in Windows, the folder containing the executable is considered the working directory.  If servedat.exe is run as a Windows Service and no other Default Home is specified, it will use the common documents folder (usually C:\Documents and Settings\All Users\Documents).

It is best to specify the home directory by using SysAuth, or an AuthFile.  If you have an AuthFile with all home directories specified, then the Default Home will never be used.