strange
strange

Reputation: 9724

WebDav detect write permission on folder

What command do we use on a WebDAV resource (such as a folder or file) to check if the user has 'write' or 'read-only' permission for that particular resource?

Upvotes: 1

Views: 1557

Answers (2)

Adam Tauno Williams
Adam Tauno Williams

Reputation: 196

The WebDAV ACL scheme is documented in RFC3744; the previous post is the correct direction to go. Privileges are described in the RFC.

Upvotes: 0

Evert
Evert

Reputation: 99533

'Plain webdav' doesn't have a way to get this information, other than trying the request and see if it fails.

CalDAV servers tend to have support for WebDAV ACL. (although not all of them though). If they do, you can find out what kind of permissions you have by requesting the current-user-privilege-set property using PROPFIND.

PROPFIND /url HTTP/1.1
Host: blabla

<?xml version="1.0"?>
<propfind xmlns="DAV:">
   <prop>
      <current-user-privilege-set />
   </prop>
</propfind>

The above request is completely from memory, so there might be mistakes.

Hope this helps,

Evert

Upvotes: 1

Related Questions