[GH-ISSUE #558] Upload to subdirectory using curl, show forbidden(403) #329

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

Originally created by @JACKCHEN99 on GitHub (Mar 19, 2025).
Original GitHub issue: https://github.com/sigoden/dufs/issues/558

Problem

  1. Started dufs V0.43.0 with docker, see picture for parameters and directory mapping.
  2. dufs root directory (e.g. dufs /data), use curl can upload files normally
  3. However, if you create a subdirectory /data/test, either on the browser page or on the server, the permissions are assigned 777. About uploading the subdirectory test.
    3.1 On the dufs page of your browser, you can upload a subdirectory via the upload button.
    3.2 curl -T /tmp/1.txt http://xxxx:44332/test, both are Forbidden.
  4. binary files using dufs are also the same, read the documentation of the parameters, it seems that there is no relevant configurations

Configuration
see the picture

Log

not much,see the picture

Screenshots/Media

Image

Environment Information

  • Dufs version: V0.43.0
  • Browser/Webdav info:
  • OS info: ubuntu22.04 server/x86
  • Proxy server (if any): no
Originally created by @JACKCHEN99 on GitHub (Mar 19, 2025). Original GitHub issue: https://github.com/sigoden/dufs/issues/558 **Problem** 1. Started dufs V0.43.0 with docker, see picture for parameters and directory mapping. 2. dufs root directory (e.g. dufs /data), use curl can upload files normally 3. However, if you create a subdirectory /data/test, either on the browser page or on the server, the permissions are assigned 777. About uploading the subdirectory test. 3.1 On the dufs page of your browser, you can upload a subdirectory via the upload button. 3.2 curl -T /tmp/1.txt http://xxxx:44332/test, both are Forbidden. 4. binary files using dufs are also the same, read the documentation of the parameters, it seems that there is no relevant configurations **Configuration** see the picture **Log** not much,see the picture **Screenshots/Media** ![Image](https://github.com/user-attachments/assets/08b57d0e-a847-4e6b-86e0-b67aa0e2d8f7) **Environment Information** - Dufs version: V0.43.0 - Browser/Webdav info: - OS info: ubuntu22.04 server/x86 - Proxy server (if any): no
zhus closed this issue 2026-04-08 16:52:04 +03:00
Author
Owner

@sigoden commented on GitHub (Mar 20, 2025):

This is because /test is a directory, and you can't upload a file to overwrite a directory.

-curl -T /tmp/1.txt http://localhost:5000/test
+curl -T /tmp/1.txt http://localhost:5000/test/1.txt
<!-- gh-comment-id:2738668218 --> @sigoden commented on GitHub (Mar 20, 2025): This is because /test is a directory, and you can't upload a file to overwrite a directory. ```diff -curl -T /tmp/1.txt http://localhost:5000/test +curl -T /tmp/1.txt http://localhost:5000/test/1.txt ```
Author
Owner

@JACKCHEN99 commented on GitHub (Mar 22, 2025):

ok, thanks

<!-- gh-comment-id:2744907378 --> @JACKCHEN99 commented on GitHub (Mar 22, 2025): ok, thanks
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#329