Server Root Directory
Each WebDAV server has a concept of a root. The root is the top-level directory accessible from the server; you can access any documents or directories in the database that are children of the root. The root therefore serves as a prefix for all document and directory URIs accessible through the WebDAV server. You enter the WebDAV root in the Admin Interface. The root can be any valid URI. The root should always end with a forward slash (/), and if it does not, the Admin Interface will append one to the string provided.
The root should be a unique string that can serve as the top of a directory structure. It is common practice to use a WebDAV root of the form http://<company_domain>/
, but that is not required. The following are some examples of WebDAV roots:
http://myCompany/marketing/
/myCompany/marketing/
Note
Directories cannot end in two forward slashes (//
). Therefore, you cannot create a directory with a URI http://
. If you specify a root of http://myCompany
for a WebDAV server and directory creation
is set to automatic
in the database, a directory with the URI http://myCompany/
is automatically created in the database.
Whatever the root, any documents accessible through the WebDAV server must have URIs that begin with the root. Also, any documents created through a WebDAV client (for example, by dragging and dropping into a web folder) will be loaded with URIs beginning with the WebDAV root.
For example, a document with URI /myCompany/marketing/strategy.doc
is accessible (given the necessary security permissions) via the WebDAV server with the root /myCompany/marketing/
, and you can create that document by dragging a document named strategy.doc
into a web folder configured to access the WebDAV server described above.
Note
When a WebDAV client accesses a WebDAV server whose database has directory creation
set to automatic
, if the WebDAV root directory does not exist in that database, it is automatically created. The directory is created with no permissions, so it will only be readable by users with the admin
role. For other users to be able to use the WebDAV server, you should add appropriate read permissions to the directory (with xdmp:document-add-permissions
, for example). For details on document and directory permissions, see Securing MarkLogic Server.