Mac OS X,  Mac OS X Server

Use wfsctl to Manage WebDAV Shares in macOS 10.13 High Sierra

Apple has slowly been moving us away from the legacy afp file sharing protocol for some time. High Sierra (macOS 10.13) now comes with a new suite of tools to manage WebDAV shares. Most of these are configurable using wfsctl located at /usr/sbin/wfsctl. When run, the tool reports as “WebDAV File Sharing control utility.”

To start the WebDAV service, use the start verb:

wfsctl start

At this point, the service will attempt to lookup the hostname of the server. If the hostname cannot be found (or once found does not match the expected results) then the service will not start. For more on why this might be happening, use the diagnose verb:

wfsctl diagnose

Once started, you can see what shares are running using the shares verb:

wfsctl shares

You can also share a folder via WebDAV using the share verb:

wfsctl share /Volumes/Pegasus/Accounting

Or unshare a directory:

wfsctl unshare /Volumes/Pegasus/Accounting

The wfsctl command doesn’t seem to interact with the web sharing options built into the web sharing services in macOS Server, although when you run diagnose it will look at services and display what’s running. From what I can tell so far, this should not be run on servers that have either of the macOS Server app web services running.