Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The access level path control used by dufs has two disadvantages:
So it needs to be refactored.
The new auth is account based, it closes #207, closes #208.
Access Control
Dufs supports account based access control. You can control who can do what on which path with
--auth
/-a
.1: Multiple rules are separated by "|"
2: User and pass are the account name and password, if omitted, it is an anonymous user
3: One rule can set multiple paths, separated by ","
4: Add
:rw
after the path to indicate that the path has read and write permissions, otherwise the path has readonly permissions.admin
has all permissions for all paths.guest
has readonly permissions for all paths.All paths is public, everyone can view/download it.
user1
has all permissions for/user1/*
path.user2
has all permissions for/user2/*
path.user
has all permissions for/dir1/*
and/dir2/*
, has readonly permissions for/dir3/
.Since dufs only allows viewing/downloading,
admin
can only view/download files.BREAKING CHANGE: new auth