[GH-ISSUE #478] running dufs as a non-root #264

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

Originally created by @mfide on GitHub (Nov 11, 2024).
Original GitHub issue: https://github.com/sigoden/dufs/issues/478

Hello,

Here is my docker-compose.yml file:

services:
  dufs-filebrowser:
    container_name: dufs-filebrowser
    volumes:
      - './downloads:/data'
      - './config.yaml:/config.yaml'
    #ports:
    #    - '5000:5000'
    image: sigoden/dufs
    restart: always
    environment:
      - DUFS_CONFIG=/config.yaml

And here is my config.yaml:

serve-path: '/data'
bind: 0.0.0.0
port: 5000
hidden:
  - 'temp/'
auth:
  - 'admins:$6$ktwDjSegR0tz233A$t8wRy8x6zlviigichqFPW7Mjuj/P3NYJfvc9F1KJYzw.a42C.nsFW7zobpY0rUAsyafEjtSZdRdDQc28I8RzZ0@/:rw'
  - 'user:$6$LdH4dsN21qSQuXH/$Zo/MDk4n9uNxcHgC.L5uYPwSWDSe.m7bbmYvpZH54bVoaSihEFuv16JSWmCq0iRw6kWt96p541l.RFMM1WN4K0@/:ro'
allow-all: false
allow-upload: true
allow-delete: true
allow-search: true
allow-symlink: false
allow-archive: false
enable-cors: true
render-index: false
render-try-index: false
render-spa: false

Which works fine.
But when I upload a file through web interface, the ownership of the file uploaded belongs to root user.

Is there a specific directive which runs dufs as a different user (non root)?

Thanks.

Originally created by @mfide on GitHub (Nov 11, 2024). Original GitHub issue: https://github.com/sigoden/dufs/issues/478 Hello, Here is my docker-compose.yml file: ```dockerfile services: dufs-filebrowser: container_name: dufs-filebrowser volumes: - './downloads:/data' - './config.yaml:/config.yaml' #ports: # - '5000:5000' image: sigoden/dufs restart: always environment: - DUFS_CONFIG=/config.yaml ``` And here is my config.yaml: ```dockerfile serve-path: '/data' bind: 0.0.0.0 port: 5000 hidden: - 'temp/' auth: - 'admins:$6$ktwDjSegR0tz233A$t8wRy8x6zlviigichqFPW7Mjuj/P3NYJfvc9F1KJYzw.a42C.nsFW7zobpY0rUAsyafEjtSZdRdDQc28I8RzZ0@/:rw' - 'user:$6$LdH4dsN21qSQuXH/$Zo/MDk4n9uNxcHgC.L5uYPwSWDSe.m7bbmYvpZH54bVoaSihEFuv16JSWmCq0iRw6kWt96p541l.RFMM1WN4K0@/:ro' allow-all: false allow-upload: true allow-delete: true allow-search: true allow-symlink: false allow-archive: false enable-cors: true render-index: false render-try-index: false render-spa: false ``` Which works fine. But when I upload a file through web interface, the ownership of the file uploaded belongs to root user. Is there a specific directive which runs dufs as a different user (non root)? Thanks.
zhus closed this issue 2026-04-08 16:51:35 +03:00
Author
Owner
<!-- gh-comment-id:2468230288 --> @sigoden commented on GitHub (Nov 11, 2024): see https://github.com/sigoden/dufs/issues/149#issuecomment-1342221464
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#264