[GH-ISSUE #307] Authentication always returns 401 on Windows Explorer's network mount #162

Closed
opened 2026-04-08 16:50:46 +03:00 by zhus · 2 comments
Owner

Originally created by @segln on GitHub (Dec 1, 2023).
Original GitHub issue: https://github.com/sigoden/dufs/issues/307

Problem
Password authentication always returns 401 on Windows Explorer's network mount and net use command.

Works well with web UI, Cyberduck, on Linux, etc.
So it is not network/LAN/DNS/web server configuration issue.

Checked it in two Windows devices on both the version from 4 months ago and the latest version of Windows, including on Windows Sandbox.

Without authentication, it works well.

Log

INFO - 192.168.0.2 "OPTIONS /" 200
INFO - 192.168.0.2 "PROPFIND /" 401
INFO - 192.168.0.2 "PROPFIND /" 401
INFO - 192.168.0.2 "PROPFIND /" 401
INFO - 192.168.0.2 "PROPFIND /" 401
INFO - 192.168.0.2 "PROPFIND /" 401
INFO - 192.168.0.2 "PROPFIND /" 401
INFO - 192.168.0.2 "PROPFIND /" 401
INFO - 192.168.0.2 "PROPFIND /" 401
INFO - 192.168.0.2 "PROPFIND /" 401
INFO - 192.168.0.2 "PROPFIND /" 401
INFO - 192.168.0.2 "PROPFIND /" 401

It worked well before, not working after deprecation of --auth-method.

Used command

dufs ./data -A -a admin:password@/:rw

net use * https://example.com/ password /user:admin

Environment:

  • Dufs version: 0.38.0
  • Browser/Webdav Info: Windows Explorer's network mount, net use
  • OS Info: Windows 11 Pro 22H2
Originally created by @segln on GitHub (Dec 1, 2023). Original GitHub issue: https://github.com/sigoden/dufs/issues/307 **Problem** Password authentication always returns 401 on Windows Explorer's network mount and `net use` command. Works well with web UI, Cyberduck, on Linux, etc.\ So it is not network/LAN/DNS/web server configuration issue. Checked it in two Windows devices on both the version from 4 months ago and the latest version of Windows, including on Windows Sandbox. Without authentication, it works well. <!-- A clear and concise description of what the bug is. --> **Log** ``` INFO - 192.168.0.2 "OPTIONS /" 200 INFO - 192.168.0.2 "PROPFIND /" 401 INFO - 192.168.0.2 "PROPFIND /" 401 INFO - 192.168.0.2 "PROPFIND /" 401 INFO - 192.168.0.2 "PROPFIND /" 401 INFO - 192.168.0.2 "PROPFIND /" 401 INFO - 192.168.0.2 "PROPFIND /" 401 INFO - 192.168.0.2 "PROPFIND /" 401 INFO - 192.168.0.2 "PROPFIND /" 401 INFO - 192.168.0.2 "PROPFIND /" 401 INFO - 192.168.0.2 "PROPFIND /" 401 INFO - 192.168.0.2 "PROPFIND /" 401 ``` It worked well before, not working after deprecation of `--auth-method`. ### Used command `dufs ./data -A -a admin:password@/:rw` `net use * https://example.com/ password /user:admin` **Environment:** - Dufs version: 0.38.0 - Browser/Webdav Info: Windows Explorer's network mount, `net use` - OS Info: Windows 11 Pro 22H2
zhus closed this issue 2026-04-08 16:50:46 +03:00
Author
Owner

@sigoden commented on GitHub (Dec 7, 2023):

After pr #279 merged, dufs will set www-authenticate as follows:

www-authenticate: Digest realm="DUFS", nonce="6571013fd6b54c9f061bd40b9587721040", qop="auth", Basic realm="DUFS"

The www-authenticate contains two challenges: Digest and Basic.

But microsoft-webdav does not support www-authorize with multiple challenges. This has caused a problem.
Who would have thought that such a big company's products do not adhere to the HTTP standard.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/WWW-Authenticate#syntax

image

<!-- gh-comment-id:1843859415 --> @sigoden commented on GitHub (Dec 7, 2023): After pr #279 merged, dufs will set `www-authenticate` as follows: ``` www-authenticate: Digest realm="DUFS", nonce="6571013fd6b54c9f061bd40b9587721040", qop="auth", Basic realm="DUFS" ``` The `www-authenticate` contains two challenges: `Digest` and `Basic`. But microsoft-webdav does not support www-authorize with multiple challenges. This has caused a problem. Who would have thought that such a big company's products do not adhere to the HTTP standard. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/WWW-Authenticate#syntax ![image](https://github.com/sigoden/dufs/assets/4012553/8884d07a-5191-40ea-a897-74f069366a2d)
Author
Owner

@segln commented on GitHub (Dec 7, 2023):

Well, they are Microsoft!

<!-- gh-comment-id:1844410081 --> @segln commented on GitHub (Dec 7, 2023): Well, they are Microsoft!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#162