Can't mount remote directory using WebDAV

10

I set up a server with Apache and WebDAV, using this tutorial.

I tested the WebDAV functionality using the Cyberduck client, and it works perfectly. I can both read and write to the remote directory using the details below.

Details entered into Cyberducks. Connection succesful!

So I want to mount this directory as a drive in Windows 8, which I believe should be possible using WebDAV. I right click "Computer", then choose "Map network drive". But it is not clear how I should enter the above data.

I have tried rewriting the URL in all the ways I could imagine, and tried with and without "Connect using different credentials".

It always just says trying to connect, then asks for credentials (if I checked that off), then gives the error "0x80070043 The network name cannot be found."

enter image description here

What is wrong? How do I mount a remote directory using WebDAV, if not like above?

windows-8
webdav
network-location
asked on Super User Nov 19, 2013 by Mads Skjern • edited Apr 8, 2015 by Enigma

3 Answers

9

Smooth Sailing with WebDAV - Microsoft Clients and Apache Servers

By default, Windows 7 and beyond will only deal with WebDAV over secure sockets (SSL). The easy way out is to obtain and install an SSL certificate on your server. After than, your server side configuration might look like this:

    Alias /webdav  /var/www/webdav

    <Directory /var/www/webdav>
            DAV on
            Satisfy all
            Order allow,deny
            Allow from all
            ForceType application/octet-stream
            AuthType Digest
            AuthName "davusers"
            AuthDigestDomain /webdav /geep /foop /goop
            AuthUserFile davusers.digest
            Require valid-user
            SSLRequireSSL
            Options Indexes
    </Directory>

The AuthDigestDomain directive should list all the locations protected by the "davusers" realm in the davusers.digest file. It tells the client browser to let users access the other locations if they have provided authentication for one of them.

On the Windows client side, map the webdav share using this url:

    https://www.myserver.com/webdav

If you really hate the idea of dealing with SSL, you can turn this requirement off using a registry hack on the Windows client. Put the following lines in a plain text file "Install - Enable BasicWebdav.reg"

    Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\WebClient\Parameters]
    "BasicAuthLevel"=dword:00000002

Right-click on the file and select "Merge". You probably need to reboot. If you want to remove this change, create a plain text file "Remove - Enable BasicWebdav.reg" Save these lines inside:

    Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\WebClient\Parameters]
    "BasicAuthLevel"=dword:00000001

Merging that will put everything back to the default values.

When you are able to mount your WebDAV share, you will be assaulted by another annoyance. Every time you drag a file from the remote folder to a local folder, you will get a menacing warning:

These files might be harmful to your computer

This is a pure example of Microsoft's famous "FUD" technique. They want people who connect to Apache servers to experience "Fear Uncertainty and Doubt."

The fix for this is a bit involved and a great deal of contradictory advice exists on the web. The first step is generally agreed:

Starting from Internet Explorer->Tools or the Control Panel, select:

Internet Options -> Security -> Local intranet

Allowed levels for this zone:

    Move the slider to: Low

Sites -> Advanced:

    Add the path to the remote webdav server.

But where does this path come from? This is the reason so much contradictory advice occurs: You must use the path shown in the Explorer window title bar after a successful connection. This will vary depending on dozens of imponderables.

For example, if the title bar shows something like:

Computer webdav (\\www.mysite.com@SSL\DavWWWRoot) (X:)

The path you add to the zone will be, using just the server part inside parentheses:

\\www.mysite.com@SSL

In your case, the server name in the tile bar may be shown as an IP address, or perhaps without @SSL: Just enter what you see. Back out of the configuration windows and the nagging will stop.

The next time you open this window, the path will look like this:

    file://www.mysite.com@ssl

This, evidently, is the canonical form Windows prefers.

In the example above, we created an exception on the local "intranet" (LAN), but you can do the same thing for remote servers if you feel daring.

Finally, and this is very important, WebDAV access from Windows will be insanely slow (as in glacial) if you don't make this adjustment:

Internet Explorer->Tools->Internet Options
Select the "Connections" tab.
Press the "LAN Settings" button.
UNCHECK: "automatically detect settings"

Every version of windows has required a new set of hacks and patches to make WebDAV work. One might get the impression that Microsoft feels threatened by this technology or, perhaps more likely, only wants to see it work with their servers.

answered on Super User Mar 17, 2014 by user2152363
1

The answer by @user2152363 is very good. Just for completeness, here are two alternative solutions you could look into:

  • Mountain Duck, from the same people as Cyberduck;
  • Rclone, an Rsync-like program that supports WebDAV.

Both of these support mounting a WebDAV server. But I'd recommend to test them first; the Rclone devs say their mount option is experimental, and in my experience Mountain Duck still has some bugs.

answered on Super User Jul 11, 2018 by Onnonymous
1
Exactly the same problem appeared with macOS Finder / Transmit ( behind reverse proxy)

Solution:


User contributions licensed under CC BY-SA 3.0