mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-08 16:49:02 +03:00
[GH-ISSUE #505] can auth the specified file?it seems that only can auth dir now,rigth? #288
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 @yuf19-2022 on GitHub (Dec 20, 2024).
Original GitHub issue: https://github.com/sigoden/dufs/issues/505
-a, --auth Add auth roles, e.g. user:pass@/dir1:rw,/dir2
can auth the specified file?it seems that only can auth dir now,rigth?
@yuf19-2022 commented on GitHub (Dec 20, 2024):
eg:/project/index.html,set "@/project/index.html".I hope can only ascess ip:5000/project,but in fact,when I access ip:5000,I will see the "project" dir.
@sigoden commented on GitHub (Dec 20, 2024):
dufs can auth on specific file.
@sigoden commented on GitHub (Dec 20, 2024):
I have tested it, and everything works fine.
Access
http://127.0.0.1:5000/project/index.html. The browser prompts for authentication; after entering the username and password, I can access the page.@yuf19-2022 commented on GitHub (Dec 20, 2024):
OK,I see.I just want when i auth /a/b to userA,he cannot access ip:5000/a,but because b is the sub dir of a,he can ascess ip:5000/a and ip:5000/a/b.
It may be not important.
@sigoden commented on GitHub (Dec 20, 2024):
First, it's important to understand that there are three types of permissions in dufs: index, read, and write.
The
-a user:pass@/a/b/grants read permissions for the directorya/band grants index permissions for the directorya.If that's not the case, please submit a details (including dufs running parameters, logs, version, etc.).