[GH-ISSUE #489] Add anonymous account in configuration file, docker compose cannot start #271

Closed
opened 2026-04-08 16:51:38 +03:00 by zhus · 1 comment
Owner

Originally created by @genspider on GitHub (Nov 24, 2024).
Original GitHub issue: https://github.com/sigoden/dufs/issues/489

Problem

When adding anonymous accounts to the configuration file, the startup failed.

Configuration

# dufs.yaml
serve-path: /data
bind: 0.0.0.0
port: 5000
path-prefix: nfs
allow-all: true
log-file: /var/log/dufs/access.log
max-upload-size: 300m
hidden:
  - tmp
  - .log                                                                                          - .lock
auth:
  - @/web
  - admin:123456789@/:rw
version: '3'
services:
  dufs:
    container_name: dufs
    image: sigoden/dufs:latest
    ports:
      - '5000:5000'
    volumes:
      - /data/env/toolkit/dufs/log:/var/log/dufs
      - /data/user:/data
      - /data/env/toolkit/dufs/dufs.yaml:/dufs.yaml
    environment:
      DUFS_CONFIG: /dufs.yaml
    restart: always

Log

$ docker logs -f dufs
Listening on:
  http://127.0.0.1:5000/nfs/
  http://172.19.0.2:5000/nfs/

Error: Failed to load config at /dufs.yaml

Caused by:
    found character that cannot start any token at line 14 column 5, while scanning for the next token
Error: Failed to load config at /dufs.yaml

Caused by:
    found character that cannot start any token at line 14 column 5, while scanning for the next token
Error: Failed to load config at /dufs.yaml

Caused by:
    found character that cannot start any token at line 14 column 5, while scanning for the next token
Error: Failed to load config at /dufs.yaml

Caused by:
    found character that cannot start any token at line 14 column 5, while scanning for the next token
Error: Failed to load config at /dufs.yaml
Originally created by @genspider on GitHub (Nov 24, 2024). Original GitHub issue: https://github.com/sigoden/dufs/issues/489 **Problem** When adding anonymous accounts to the configuration file, the startup failed. **Configuration** ``` # dufs.yaml serve-path: /data bind: 0.0.0.0 port: 5000 path-prefix: nfs allow-all: true log-file: /var/log/dufs/access.log max-upload-size: 300m hidden: - tmp - .log - .lock auth: - @/web - admin:123456789@/:rw ``` ``` version: '3' services: dufs: container_name: dufs image: sigoden/dufs:latest ports: - '5000:5000' volumes: - /data/env/toolkit/dufs/log:/var/log/dufs - /data/user:/data - /data/env/toolkit/dufs/dufs.yaml:/dufs.yaml environment: DUFS_CONFIG: /dufs.yaml restart: always ``` **Log** ``` $ docker logs -f dufs Listening on: http://127.0.0.1:5000/nfs/ http://172.19.0.2:5000/nfs/ Error: Failed to load config at /dufs.yaml Caused by: found character that cannot start any token at line 14 column 5, while scanning for the next token Error: Failed to load config at /dufs.yaml Caused by: found character that cannot start any token at line 14 column 5, while scanning for the next token Error: Failed to load config at /dufs.yaml Caused by: found character that cannot start any token at line 14 column 5, while scanning for the next token Error: Failed to load config at /dufs.yaml Caused by: found character that cannot start any token at line 14 column 5, while scanning for the next token Error: Failed to load config at /dufs.yaml ```
zhus closed this issue 2026-04-08 16:51:38 +03:00
Author
Owner

@sigoden commented on GitHub (Nov 25, 2024):

The error message has indicated the problem found character that cannot start any token at line 14 column 5

auth:
-  - @/web
+  - '@/web'
  - admin:123456789@/:rw

The readme also pointed this out:
image

<!-- gh-comment-id:2496278976 --> @sigoden commented on GitHub (Nov 25, 2024): The error message has indicated the problem `found character that cannot start any token at line 14 column 5` ```diff auth: - - @/web + - '@/web' - admin:123456789@/:rw ``` The readme also pointed this out: ![image](https://github.com/user-attachments/assets/773a3a9e-5766-49c8-ac74-bc2324a9b7df)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#271