(408) 943-4100               V   Commercial Support

WebDAV Shares

  3 minute read.

Last Modified 2021-06-16 11:56 EDT

WebDAV stands for Web-based Distributed Authoring and Versioning, which is an extension to HTTP. In TrueNAS, WebDAV shares can be created so that authenticated users can browse the contents of a specified pool, dataset, or directory from a web browser.

To create a new share, make sure a dataset is available with all the data for sharing.

Share Configuration

Go to Shares > WebDAV and click Add.

SharingWebdavAdd

Enter a share Name and use the file browser to select the dataset to be shared. An optional Description helps to identify the share. To prevent user accounts from modifying the shared data, set Read Only.

By default, Change User & Group Ownership is set. This changes existing ownership of ALL files in the share to the webdav user and group accounts. The default simplifies WebDAV share permission, but is unexpected, so the web interface shows a warning:

Webdav Add Warning

Setting the Confirm checkbox and clicking OK will create the share.

This warning does not show when Change User & Group Ownsership is unset. In that situation, shared file ownership must be manually set to the webdav or www user and group accounts.

By default, the new WebDAV share is immediately active. To create the share but not immediately activate it, unset Enable. If Change User & Group Ownsership was unset, click Save to create the share.

There are multiple ways to enter the edit mode for a share:

  1. Click on either the WebDAV header or View Details. From this page click then Edit.
  2. Clicking anywhere within the row of the share you created will open the Edit WebDAV section.

Service Activation

Creating a share immediately opens a dialog to activate the WebDAV service:

WebdavServiceEnable

To later enable or disable the WebDAV system service, go to either System Settings > Services and toggle WebDAV, or Shares and click within the WebDAV header and select Turn Off Service. To automatically start the service when TrueNAS boots, set Start Automatically. Click the to change the service settings.

WebDAVServiceOptions

For better data security, set the Protocol to HTTPS. This requires choosing an SSL certificate, but the freenas_default certificate is always available. All of the Protocol options require defining a Port number. Make sure the WebDAV service port is not already used on the network.

To prevent unauthorized access to the shared data, set the HTTP Authentication to either Basic or Digest and create a new Webdav Password.

Be sure to click Save after making any changes.

Connecting to the WebDAV Share

WebDAV shared data is accessible from a web browser. To see the shared data, open a new browser tab and enter {PROTOCOL}://{TRUENASIP}:{PORT}/{SHAREPATH}. Replace the elements in curly brackets {} with your chosen settings from the WebDAV share and service. Example: https://10.2.1.1:8081/mnt/corepool1/newdataset

When the Authentication WebDAV service option is set to either Basic or Digest, a user name and password is required. Enter the user name webdav and the password defined in the WebDAV service.