You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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:
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?
The text was updated successfully, but these errors were encountered: