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 '/').

If no home directory is given by the operating system, then the Default Home will be used as described below.

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

The default home directory is used when a user's home directory is unspecified or unavailable.  This may occur when AuthFile user (inlcuding "ANONYMOUS") has no home directory , or when the operating system does not specify a home directory for a SysAuth user.  On Windows servers, this may occur if a user account has been created but the user has not yet logged on to the desktop.

The Default Home is determined as follows:

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.

Command Line Default
When running servedat on the command line with no home directory specified on the command line and no HomeDir set, the current working directory "." will be used.

QuickStart Default
When running servedat by double clicking the executable in Windows, with no HomeDir set, the folder containing servedat will be used.  In Mac OS X, the home directory of the user double clicking servedat will be used.

Windows Service Default
When installed as a Windows service and HomeDir is not set, the "common documents folder" will be used.  In Windows XP this is usually "C:\Documents and Settings\All Users\Documents.  In Vista or Windows 7 this is usually "C:\Users\Public\Documents"

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