[GH-ISSUE #273] Wrong documentation of --auth #145

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

Originally created by @sralloza on GitHub (Oct 11, 2023).
Original GitHub issue: https://github.com/sigoden/dufs/issues/273

Problem

First, shoutout to the creator for this fantastic yet simple http server.

According to the docs, authentication can be enabled with dufs -a admin:123@/:rw, but testing I think that the auth format is /path/to/something@user:password instead of user:password@/:permissions.

In fact, executing the last command (from the README) doesn't seem to work:

$ dufs -a admin:123@/:rw -p 8080 &
$ curl --user admin:123 http://localhost:8080\?simple --digest -i
HTTP/1.1 401 Unauthorized
allow: GET,HEAD,PUT,OPTIONS,DELETE,PROPFIND,COPY,MOVE
dav: 1,2
connection: close
www-authenticate: Digest realm="DUFS",nonce="6525c54e673367659b6328b649a0e8f6d0",qop="auth"
content-length: 0
date: Tue, 10 Oct 2023 21:42:38 GMT

HTTP/1.1 401 Unauthorized
allow: GET,HEAD,PUT,OPTIONS,DELETE,PROPFIND,COPY,MOVE
dav: 1,2
connection: close
www-authenticate: Digest realm="DUFS",nonce="6525c54e673367659b6328b649a0e8f6d0",qop="auth"
content-length: 0
date: Tue, 10 Oct 2023 21:42:38 GMT
$ dufs -a /@admin:123 -p 8080 &
$ curl --user admin:123 http://localhost:8080?simple --digest -i
HTTP/1.1 401 Unauthorized
allow: GET,HEAD,PUT,OPTIONS,DELETE,PROPFIND,COPY,MOVE
dav: 1,2
connection: close
www-authenticate: Digest realm="DUFS",nonce="6525c483e1e1c4b58772041fbae7296df0",qop="auth"
content-length: 0
date: Tue, 10 Oct 2023 21:39:15 GMT

HTTP/1.1 200 OK
content-type: text/html; charset=utf-8
content-length: 300
date: Tue, 10 Oct 2023 21:39:15 GMT

[...]

Am I missing something or are the docs outdated? Also I couldn't make it work with custom permissions.

Environment:

  • Dufs version: 0.32.0
  • Browser/Webdav Info: n/a
  • OS Info: MacBook Pro M1 Ventura 13.2.1 (22D68)
Originally created by @sralloza on GitHub (Oct 11, 2023). Original GitHub issue: https://github.com/sigoden/dufs/issues/273 **Problem** First, shoutout to the creator for this fantastic yet simple http server. According to the docs, authentication can be enabled with `dufs -a admin:123@/:rw`, but testing I think that the auth format is `/path/to/something@user:password` instead of `user:password@/:permissions`. In fact, executing the last command (from the README) doesn't seem to work: ```shell $ dufs -a admin:123@/:rw -p 8080 & $ curl --user admin:123 http://localhost:8080\?simple --digest -i HTTP/1.1 401 Unauthorized allow: GET,HEAD,PUT,OPTIONS,DELETE,PROPFIND,COPY,MOVE dav: 1,2 connection: close www-authenticate: Digest realm="DUFS",nonce="6525c54e673367659b6328b649a0e8f6d0",qop="auth" content-length: 0 date: Tue, 10 Oct 2023 21:42:38 GMT HTTP/1.1 401 Unauthorized allow: GET,HEAD,PUT,OPTIONS,DELETE,PROPFIND,COPY,MOVE dav: 1,2 connection: close www-authenticate: Digest realm="DUFS",nonce="6525c54e673367659b6328b649a0e8f6d0",qop="auth" content-length: 0 date: Tue, 10 Oct 2023 21:42:38 GMT ``` ```shell $ dufs -a /@admin:123 -p 8080 & $ curl --user admin:123 http://localhost:8080?simple --digest -i HTTP/1.1 401 Unauthorized allow: GET,HEAD,PUT,OPTIONS,DELETE,PROPFIND,COPY,MOVE dav: 1,2 connection: close www-authenticate: Digest realm="DUFS",nonce="6525c483e1e1c4b58772041fbae7296df0",qop="auth" content-length: 0 date: Tue, 10 Oct 2023 21:39:15 GMT HTTP/1.1 200 OK content-type: text/html; charset=utf-8 content-length: 300 date: Tue, 10 Oct 2023 21:39:15 GMT [...] ``` Am I missing something or are the docs outdated? Also I couldn't make it work with custom permissions. **Environment:** - Dufs version: 0.32.0 - Browser/Webdav Info: n/a - OS Info: MacBook Pro M1 Ventura 13.2.1 (22D68)
zhus closed this issue 2026-04-08 16:50:40 +03:00
Author
Owner

@sigoden commented on GitHub (Oct 11, 2023):

New auth added at v0.34.0, please update dufs to latest version, then try again.

<!-- gh-comment-id:1756479133 --> @sigoden commented on GitHub (Oct 11, 2023): New auth added at v0.34.0, please update dufs to latest version, then try again.
Author
Owner

@sralloza commented on GitHub (Oct 11, 2023):

Thanks for the quick response! I installed dufs using brew, it seems 0.32.0 it's the latest version there

<!-- gh-comment-id:1756489446 --> @sralloza commented on GitHub (Oct 11, 2023): Thanks for the quick response! I installed dufs using brew, it seems 0.32.0 it's the latest version there
Author
Owner

@sigoden commented on GitHub (Oct 11, 2023):

The lastest version of dufs in homebrew is also v0.36.0. maybe you should update your brew fomurla.

see https://formulae.brew.sh/formula/dufs

<!-- gh-comment-id:1756530465 --> @sigoden commented on GitHub (Oct 11, 2023): The lastest version of dufs in homebrew is also v0.36.0. maybe you should update your brew fomurla. see https://formulae.brew.sh/formula/dufs
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#145