[GH-ISSUE #436] Getting "Forbidden" at login, but (sometimes) after refresh login succeeds #236

Closed
opened 2026-04-08 16:51:22 +03:00 by zhus · 4 comments
Owner

Originally created by @bonsairobo on GitHub (Aug 22, 2024).
Original GitHub issue: https://github.com/sigoden/dufs/issues/436

Problem

On Firefox + Linux:

When I log in (in Firefox), I get a popup that says "Forbidden". But then if I refresh the page, I am logged in.

On Safari or Firefox + iPad:

Logging in says "Forbidden", and refresh does nothing. Even trying to log in again just immediately pops up "Forbidden" without any form.

Configuration

      serve-path: '/the/path'
      bind: 0.0.0.0
      port: 5000
      allow-all: false
      allow-upload: true
      allow-delete: true
      allow-search: true
      allow-symlink: true
      allow-archive: true
      enable-cors: true
      render-index: false
      render-try-index: false
      render-spa: false
      compress: medium

      auth:
        - user1:pass1@/public:rw,/user1/public:rw,/user1/private/:rw
        - user2:pass2@/public:rw,/user2/public:rw,/user2/private/:rw
        - '@/public:ro,/user1/public:ro,/user2/public:ro'

Log

Aug 21 15:19:25 duncan-nixos systemd[1]: Started dufs web file service.
Aug 21 15:19:25 duncan-nixos dufs[53859]: Listening on:
Aug 21 15:19:25 duncan-nixos dufs[53859]:   http://10.248.76.2:5000/
Aug 21 15:19:25 duncan-nixos dufs[53859]:   http://127.0.0.1:5000/
Aug 21 15:19:51 duncan-nixos dufs[53859]: 2024-08-21T15:19:51-07:00 INFO - 10.248.76.2 "GET /" 200
Aug 21 15:19:51 duncan-nixos dufs[53859]: 2024-08-21T15:19:51-07:00 INFO - 10.248.76.2 "GET /__dufs_v0.41.0__/index.css" 200
Aug 21 15:19:51 duncan-nixos dufs[53859]: 2024-08-21T15:19:51-07:00 INFO - 10.248.76.2 "GET /__dufs_v0.41.0__/index.js" 200
Aug 21 15:19:51 duncan-nixos dufs[53859]: 2024-08-21T15:19:51-07:00 INFO - 10.248.76.2 "GET /__dufs_v0.41.0__/favicon.ico" 200
Aug 21 15:19:55 duncan-nixos dufs[53859]: 2024-08-21T15:19:55-07:00 INFO - 10.248.76.2 "WRITEABLE /" 401
Aug 21 15:19:59 duncan-nixos dufs[53859]: 2024-08-21T15:19:59-07:00 INFO - 10.248.76.2 "WRITEABLE /" 403
Aug 21 15:20:04 duncan-nixos dufs[53859]: 2024-08-21T15:20:04-07:00 INFO - 10.248.76.2 "GET /" 200
Aug 21 15:20:04 duncan-nixos dufs[53859]: 2024-08-21T15:20:04-07:00 INFO - 10.248.76.2 "GET /__dufs_v0.41.0__/index.js" 200
Aug 21 15:20:04 duncan-nixos dufs[53859]: 2024-08-21T15:20:04-07:00 INFO - 10.248.76.2 "GET /__dufs_v0.41.0__/favicon.ico" 200

Environment:

  • Dufs version: 0.41.0
  • Browser/Webdav info: Firefox
  • OS info: NixOS Unstable
  • Proxy server: none
Originally created by @bonsairobo on GitHub (Aug 22, 2024). Original GitHub issue: https://github.com/sigoden/dufs/issues/436 **Problem** On Firefox + Linux: When I log in (in Firefox), I get a popup that says "Forbidden". But then if I refresh the page, I am logged in. On Safari or Firefox + iPad: Logging in says "Forbidden", and refresh does nothing. Even trying to log in again just immediately pops up "Forbidden" without any form. **Configuration** <!-- The dufs command-line arguments or configuration --> ``` serve-path: '/the/path' bind: 0.0.0.0 port: 5000 allow-all: false allow-upload: true allow-delete: true allow-search: true allow-symlink: true allow-archive: true enable-cors: true render-index: false render-try-index: false render-spa: false compress: medium auth: - user1:pass1@/public:rw,/user1/public:rw,/user1/private/:rw - user2:pass2@/public:rw,/user2/public:rw,/user2/private/:rw - '@/public:ro,/user1/public:ro,/user2/public:ro' ``` <!-- If the problems are related to auth/perm, please conceal only the user:pass, but do not hide the entire `auth` configuration. --> **Log** ``` Aug 21 15:19:25 duncan-nixos systemd[1]: Started dufs web file service. Aug 21 15:19:25 duncan-nixos dufs[53859]: Listening on: Aug 21 15:19:25 duncan-nixos dufs[53859]: http://10.248.76.2:5000/ Aug 21 15:19:25 duncan-nixos dufs[53859]: http://127.0.0.1:5000/ Aug 21 15:19:51 duncan-nixos dufs[53859]: 2024-08-21T15:19:51-07:00 INFO - 10.248.76.2 "GET /" 200 Aug 21 15:19:51 duncan-nixos dufs[53859]: 2024-08-21T15:19:51-07:00 INFO - 10.248.76.2 "GET /__dufs_v0.41.0__/index.css" 200 Aug 21 15:19:51 duncan-nixos dufs[53859]: 2024-08-21T15:19:51-07:00 INFO - 10.248.76.2 "GET /__dufs_v0.41.0__/index.js" 200 Aug 21 15:19:51 duncan-nixos dufs[53859]: 2024-08-21T15:19:51-07:00 INFO - 10.248.76.2 "GET /__dufs_v0.41.0__/favicon.ico" 200 Aug 21 15:19:55 duncan-nixos dufs[53859]: 2024-08-21T15:19:55-07:00 INFO - 10.248.76.2 "WRITEABLE /" 401 Aug 21 15:19:59 duncan-nixos dufs[53859]: 2024-08-21T15:19:59-07:00 INFO - 10.248.76.2 "WRITEABLE /" 403 Aug 21 15:20:04 duncan-nixos dufs[53859]: 2024-08-21T15:20:04-07:00 INFO - 10.248.76.2 "GET /" 200 Aug 21 15:20:04 duncan-nixos dufs[53859]: 2024-08-21T15:20:04-07:00 INFO - 10.248.76.2 "GET /__dufs_v0.41.0__/index.js" 200 Aug 21 15:20:04 duncan-nixos dufs[53859]: 2024-08-21T15:20:04-07:00 INFO - 10.248.76.2 "GET /__dufs_v0.41.0__/favicon.ico" 200 ``` **Environment:** - Dufs version: 0.41.0 - Browser/Webdav info: Firefox - OS info: NixOS Unstable - Proxy server: none
zhus closed this issue 2026-04-08 16:51:22 +03:00
Author
Owner

@sigoden commented on GitHub (Aug 22, 2024):

@bonsairobo

Could you provide a demonstration video?

<!-- gh-comment-id:2303219804 --> @sigoden commented on GitHub (Aug 22, 2024): @bonsairobo Could you provide a demonstration video?
Author
Owner
<!-- gh-comment-id:2303294728 --> @bonsairobo commented on GitHub (Aug 22, 2024): https://github.com/user-attachments/assets/d4c47ec4-dd42-4157-95d1-728b84c5a92c
Author
Owner

@sigoden commented on GitHub (Aug 22, 2024):

@bonsairobo

Aug 21 15:19:59 duncan-nixos dufs[53859]: 2024-08-21T15:19:59-07:00 INFO - 10.248.76.2 "WRITEABLE /" 403

How is this record generated? If the login fails, it returns the pop-up window will reappear. If successful, it returns a 200 status code.

# Failed
2024-08-22T07:58:48+08:00 INFO - 192.168.8.8 "WRITEABLE /" 401
2024-08-22T07:58:51+08:00 INFO - 192.168.8.8 "WRITEABLE /" 401
2024-08-22T07:58:54+08:00 INFO - 192.168.8.8 "WRITEABLE /" 401
# Succeed
2024-08-22T07:59:48+08:00 INFO - 192.168.8.8 "WRITEABLE /" 401
2024-08-22T07:59:51+08:00 INFO - 192.168.8.8 "WRITEABLE /" 200

Can you share your configuration that matchs your video? I'm unable to reproduce the issue you're describing without it.

<!-- gh-comment-id:2303322747 --> @sigoden commented on GitHub (Aug 22, 2024): @bonsairobo ``` Aug 21 15:19:59 duncan-nixos dufs[53859]: 2024-08-21T15:19:59-07:00 INFO - 10.248.76.2 "WRITEABLE /" 403 ``` How is this record generated? If the login fails, it returns the pop-up window will reappear. If successful, it returns a 200 status code. ``` # Failed 2024-08-22T07:58:48+08:00 INFO - 192.168.8.8 "WRITEABLE /" 401 2024-08-22T07:58:51+08:00 INFO - 192.168.8.8 "WRITEABLE /" 401 2024-08-22T07:58:54+08:00 INFO - 192.168.8.8 "WRITEABLE /" 401 # Succeed 2024-08-22T07:59:48+08:00 INFO - 192.168.8.8 "WRITEABLE /" 401 2024-08-22T07:59:51+08:00 INFO - 192.168.8.8 "WRITEABLE /" 200 ``` Can you share your configuration that matchs your video? I'm unable to reproduce the issue you're describing without it.
Author
Owner

@bonsairobo commented on GitHub (Aug 22, 2024):

How is this record generated? If the login fails, it returns the pop-up window will reappear. If successful, it returns a 200 status code.

I believe that occurs when I try to log in.

Can you share your configuration that matchs your video? I'm unable to reproduce the issue you're describing without it.

I did in the original post. Only the user/directory names were changed.

<!-- gh-comment-id:2303333543 --> @bonsairobo commented on GitHub (Aug 22, 2024): > How is this record generated? If the login fails, it returns the pop-up window will reappear. If successful, it returns a 200 status code. I believe that occurs when I try to log in. > Can you share your configuration that matchs your video? I'm unable to reproduce the issue you're describing without it. I did in the original post. Only the user/directory names were changed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#236