[GH-ISSUE #398] 403 Forbidden #212

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

Originally created by @vwkd on GitHub (Jun 12, 2024).
Original GitHub issue: https://github.com/sigoden/dufs/issues/398

Problem

I'm trying to run dufs via podman on Fedora and mount the local directory to the /data directory as shown in the README and in #129. However, accessing the server URL gives a 403 Forbidden error.

If serving . instead of the /data directory, the server returns the error when accessing the /data URL path instead of the / URL path.

Configuration

  • docker-compose.yml
version: "3"

services:
  dufs:
    image: docker.io/sigoden/dufs:latest
    environment:
      - DUFS_SERVE_PATH=/data
#     - DUFS_SERVE_PATH=.
      - DUFS_AUTH=admin:pass@/:rw
      - DUFS_ALLOW_ALL=true
    restart: always
    volumes:
    - ./:/data
    ports:
    - "5000:5000"

Log

  • podman compose up
>>>> Executing external compose provider "/usr/bin/podman-compose". Please refer to the documentation for details. <<<<

51766158917d576f390d21e54853896c71d6f76c08abc4c27ced0c24af033b6c
3280ab5baa61463998846e642cb5a1d2f983f8f7ae84a2b4d429bd05188eb3c9
[dufs] | Listening on:
[dufs] |   http://10.89.3.217:5000/
[dufs] |   http://127.0.0.1:5000/
[dufs] |   http://[::1]:5000/
[dufs] |
[dufs] | 2024-06-12T11:03:00Z INFO - 10.89.3.217 "GET /" 401
[dufs] | 2024-06-12T11:03:03Z INFO - 10.89.3.217 "GET /" 403

Environment:

  • Dufs version: v0.41.0
  • Browser/Webdav info: Firefox 126.0.1
  • OS info: Fedora 40
  • Podman: 5.0.3
  • Proxy server: -
Originally created by @vwkd on GitHub (Jun 12, 2024). Original GitHub issue: https://github.com/sigoden/dufs/issues/398 **Problem** I'm trying to run `dufs` via podman on Fedora and mount the local directory to the `/data` directory as shown in the [README](https://github.com/sigoden/dufs/blob/dc7a7cbb3f0f19441152de036c5bc904dc9186e3/README.md#with-docker) and in [#129](https://github.com/sigoden/dufs/issues/129#issuecomment-1229046483). However, accessing the server URL gives a `403 Forbidden` error. If serving `.` instead of the `/data` directory, the server returns the error when accessing the `/data` URL path instead of the `/` URL path. **Configuration** - `docker-compose.yml` ```yml version: "3" services: dufs: image: docker.io/sigoden/dufs:latest environment: - DUFS_SERVE_PATH=/data # - DUFS_SERVE_PATH=. - DUFS_AUTH=admin:pass@/:rw - DUFS_ALLOW_ALL=true restart: always volumes: - ./:/data ports: - "5000:5000" ``` **Log** - `podman compose up` ```txt >>>> Executing external compose provider "/usr/bin/podman-compose". Please refer to the documentation for details. <<<< 51766158917d576f390d21e54853896c71d6f76c08abc4c27ced0c24af033b6c 3280ab5baa61463998846e642cb5a1d2f983f8f7ae84a2b4d429bd05188eb3c9 [dufs] | Listening on: [dufs] | http://10.89.3.217:5000/ [dufs] | http://127.0.0.1:5000/ [dufs] | http://[::1]:5000/ [dufs] | [dufs] | 2024-06-12T11:03:00Z INFO - 10.89.3.217 "GET /" 401 [dufs] | 2024-06-12T11:03:03Z INFO - 10.89.3.217 "GET /" 403 ``` **Environment:** - Dufs version: v0.41.0 - Browser/Webdav info: Firefox 126.0.1 - OS info: Fedora 40 - Podman: 5.0.3 - Proxy server: -
zhus closed this issue 2026-04-08 16:51:12 +03:00
Author
Owner

@sigoden commented on GitHub (Jun 12, 2024):

@vwkd

I copied your docker-compose.yaml file, then ran it, and everything works correctly.
Did you input the wrong username and password?

curl -u admin:pass http://localhost:5000
<!-- gh-comment-id:2162769977 --> @sigoden commented on GitHub (Jun 12, 2024): @vwkd I copied your docker-compose.yaml file, then ran it, and everything works correctly. Did you input the wrong username and password? ``` curl -u admin:pass http://localhost:5000 ```
Author
Owner

@vwkd commented on GitHub (Jun 12, 2024):

Turned out it was a SELinux issue and setting the permissions to :Z as suggested by StackOverflow fixed it.

    volumes:
    - ./:/data:Z
<!-- gh-comment-id:2162786674 --> @vwkd commented on GitHub (Jun 12, 2024): Turned out it was a SELinux issue and setting the permissions to `:Z` as suggested by [StackOverflow](https://stackoverflow.com/a/66652632/2607891) fixed it. ```yml volumes: - ./:/data:Z ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#212