Не удается смонтировать удаленный каталог с помощью WebDAV

9415
Mads Skjern

Я настроил сервер с Apache и WebDAV, используя это руководство .

Я протестировал функциональность WebDAV с помощью клиента Cyberduck, и он отлично работает. Я могу как читать, так и писать в удаленный каталог, используя подробности ниже.

Подробности вошли в кибердаки.  Соединение успешно!

Поэтому я хочу смонтировать этот каталог как диск в Windows 8, что, по моему мнению, должно быть возможно с использованием WebDAV. Я щелкаю правой кнопкой мыши «Компьютер», затем выбираю «Подключить сетевой диск». Но не ясно, как мне следует вводить вышеуказанные данные.

Я попытался переписать URL всеми способами, которые я мог себе представить, и попытался с «Без использования различных учетных данных» и без него.

Он всегда просто говорит, что пытается подключиться, затем запрашивает учетные данные (если я его отключил), а затем выдает ошибку «0x80070043 Имя сети не найдено».

Не удается смонтировать удаленный каталог с помощью WebDAV

Что случилось? Как мне смонтировать удаленный каталог с помощью WebDAV, если не как выше?

8

2 ответа на вопрос

8
user2152363

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.

Спасибо за очень подробный и подробный ответ. «К сожалению», я вернулся к разработке под Linux, главным образом потому, что никогда не находил хорошего способа работы на удаленных серверах из Windows. Я все еще одобрил ваш ответ, надеясь, что вы правы :) Mads Skjern 10 лет назад 0
Отличный ответ, @ Хью-Спаркс !!! Paulo Coghi 9 лет назад 0
0
Onnonymous

Ответ @ user2152363 очень хороший. Для полноты изложения предлагаем два альтернативных решения:

  • Mountain Duck, из тех же людей, что и Cyberduck;
  • Rclone, Rsync-подобная программа, которая поддерживает WebDAV.

Оба из них поддерживают монтирование сервера WebDAV. Но я бы рекомендовал сначала проверить их; разработчики Rclone говорят, что их вариант монтирования является экспериментальным, и, по моему опыту, у Mountain Duck все еще есть ошибки.