mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-08 16:49:02 +03:00
[GH-ISSUE #552] 用户权限问题 #327
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @DanielZWX on GitHub (Feb 25, 2025).
Original GitHub issue: https://github.com/sigoden/dufs/issues/552
Problem
我的配置文件如下:
(运行DUFS 的服务器地址为172.16.11.194),在客户端(ubuntu 22.04)下运行以下指令(认证用户 3 却去下载用户 2 目录下的文件)
curl http://172.16.11.194:5000/dufs/class2/class2zip -o ./class2.zip --user class3user:pass期望下载失败,但却能成功!
Environment Information
@sigoden commented on GitHub (Feb 25, 2025):
Cannot confirm the bug.
How stupid I am to actually test according to your configuration. dufs has complete tests, it is impossible for such a low-level error to occur.
@DanielZWX commented on GitHub (Feb 25, 2025):
是的,你是对的,权限没问题。
是服务器返回了 "Forbidden",curl 命令将返回的信息保存为指定的文件了,使我误以为下载成功了。
抱歉浪费你时间了
@DanielZWX commented on GitHub (Feb 25, 2025):
curl --fail http://172.16.11.194:5000/dufs/class2/class2zip -o ./class2.zip --user class3user:pass% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (22) The requested URL returned error: 403 Forbidden
在指令中加个 --fail 选项可避免上面的情况