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

Feature Request: allow/deny modification permissions for specific paths #20

Closed
mikolysz opened this issue Mar 10, 2018 · 2 comments
Closed

Comments

@mikolysz
Copy link

Currently, we can grant someone permissions to modify everything they have access to, but we can't really restrict that to certain paths. We could, for example, want the whole webdav to be readonly for everyone except the admin but there could be an upload directory anyone could upload to.

A sample caddyfile excerpt could look like:

basicauth / admin admin

webdav {
scope /home/webdav
modify false # Normal users can't modify
allow /upload modify # but they can modify in /upload
block /tmp # Normal users can't access/tmp

admin
modify true # Admin can modify everything
allow /tmp nomodify # Admin can read in tmp but it's still protected from accidental modification.

Basically the idea is to add an optional third argument to the allow and allow_r directives that could either be true/false or modify/nomodify, that would grant or deny modification privileges for that path with no regard to the modify property on the user.
The modify property could even be removed or its use discouraged, because you could write allow / modify or allow / nomodify instead and optionally add exceptions to specific paths.
Another idea is to change the modify directive itself to accept a third, optional argument that defaults to / and restricts the directive to a specific path.
Will you accept a pull request implementing this? @hacdias what approach would you consider to be the best?

@hacdias
Copy link
Owner

hacdias commented May 12, 2019

@devil418 I know it's been a really long time and I'm really sorry for this. Yes, a PR is always welcome!

@hacdias hacdias transferred this issue from hacdias/caddy-v1-webdav May 12, 2019
@hacdias
Copy link
Owner

hacdias commented Jul 22, 2024

Caddy-specific. No longer relevant.

@hacdias hacdias closed this as completed Jul 22, 2024
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

No branches or pull requests

2 participants