Comments (8)
You could probably use something like:
@forbidWrite {
vars http.auth.user.id test
not method GET HEAD OPTIONS PROPFIND
}
handle @forbidWrite {
respond "Not allowed" 403
}
handle {
# everything else
}
from caddy-webdav.
Came here to say thank you @mholt - this is the only solution that works here - I can see files but not modify them.
EDIT: ah well, adding a second user actually has got the same behavior as guest
. I cannot read/write. It is a pity cause this seems the only way to do this, I'll have to ask on the forum.
with this conf:
:8080 {
rewrite /dav /dav/
# Thank you mholt for this solution:
# https://github.com/mholt/caddy-webdav/issues/27
@noGuestsWrite {
vars http.auth.user.id guest
not method GET HEAD OPTIONS PROPFIND
}
handle @noGuestsWrite {
respond 403
}
handle {
basicauth /dav/media {
guest <XYZ>
}
webdav /dav/* {
root /srv/http/dav/All
prefix /dav/media
}
file_server
}
}
from caddy-webdav.
Depends on how you're authenticating users and such. What is your config / what have you tried so far?
from caddy-webdav.
thx
:2333
{
encode gzip
basicauth {
underlaw JDJhJDE0JDI1OUJCR3VndzBWUWtSU3ZsdVJXUGVrLzlsV0M2N3AuN2taRmkvY2ZnMlVIR1VtZnE4bjN5
test JDJhJDE0JDI1OUJCR3VndzBWUWtSU3ZsdVJXUGVrLzlsV0M2N3AuN2taRmkvY2ZnMlVIR1VtZnE4bjN5
}
root * /mnt/sda1/movie
route {
rewrite /webdav /webdav/
webdav /webdav/* {
prefix /webdav
}
file_server browse
}
}
underlaw has read, write, edit and delete permission; test has only read permission.
how to do? thx
from caddy-webdav.
Are you talking about setting different shared folders for different users? This is different from what I want. I want the same shared folder, but different users have different permissions. Thank you
from caddy-webdav.
I mean: the shared folder is /mnt/sda1/movie, undelaw has read-write permission, and test only has read permission.
from caddy-webdav.
No, that's disallowing writes for the user named test
.
With further questions, please try asking on our forums! https://caddy.community
from caddy-webdav.
No, that's disallowing writes for the user named
test
.With further questions, please try asking on our forums! https://caddy.community
But it also disallow read files from server on applications that support webdav when test
remove method PROPFIND
.
And it retains method PROPFIND
, test
can delete files from server.
Just want to share friends with accounts and not to modify files on server.
from caddy-webdav.
Related Issues (20)
- Is it possible to have directory listing with WebDAV enabled in the same path? HOT 3
- Permission/Path issues with webdav-module using systemd service
- Can you add the modify option like cdday-v1-webdav? It can achieve read-only access HOT 1
- can not use xcaddy build caddy v2.4.3 with webdav HOT 3
- Every time you use webdav to sync photos, an error will be reported, HOT 2
- encoded url can escape path limit HOT 4
- HEAD requests should work also on folders HOT 1
- Can not upload large file HOT 2
- The webdav service filter some files for unknown reason HOT 3
- Issue with webdav RANGE requests HOT 3
- FR: hide option HOT 1
- CF HOT 3
- Webdav with Jetbrains Rider, Caddy and ASP NET Core Umbraco CMS HOT 7
- TLS and Webdav client HOT 1
- LOCK/UNLOCK and other Webdav method support HOT 5
- root directive appears to ignore {http.auth.user.id}
- How to have WebDAV server run under a subdirectory of a subdomain? HOT 3
- Not compatible with MacOS Finder HOT 3
- Can not build with the new Go version HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from caddy-webdav.