Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write permissions will be overwritten by anonymous read-only permissions #519

Closed
VergilGao opened this issue Dec 31, 2024 · 1 comment · Fixed by #521
Closed

Write permissions will be overwritten by anonymous read-only permissions #519

VergilGao opened this issue Dec 31, 2024 · 1 comment · Fixed by #521

Comments

@VergilGao
Copy link

If I configure both -a "@/path1, /path2" and -a "admin:123456@/:rw" at the same time, then admin's access rights to files in the /path1 directory will become readonly.
I can use -a "admin:123456@/:rw, /path1:rw, path2:rw" to fix this.

@sigoden
Copy link
Owner

sigoden commented Jan 2, 2025

Why did this happen?

The anonymous auth paths will be merged with user auth paths.
-a admin:123456@/:rw -a @/path1,/path2 will expand to -a admin:123456@/:rw,/path1,/path2 -a @/path1,/path2

Since dufs supports auth precedule (#325), so the perm of /path1,/path2 is read-only.

How to improve

After you reported this issue, we noticed that this is not a good design. We can download /path1, make some change, then re-upload /path1 to bypass this limitation.

So we need to make adjustments: A parent path with higher permissions can shadow a child path with lower permissions.

/:rw,/path1 will expand to /:rw, but /,/path1:rw will remain unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants