Inhaltsverzeichnis

WEBDAV Debugging

RFC: https://tools.ietf.org/html/rfc4918

DAV Ressource als Dateisystem mounten mit davfs2

mount -t davfs https://www.netzwissen.de/dev/owncloud/remote.php/dav/ /mnt/dav/

Liste der Ressourcen (Verzeichnisse als xml Stream)

PROPFIND -u Thommie2 https://www.netzwissen.de/owncloud/remote.php/webdav

Test mit CURL

siehe https://code.blogs.iiidefix.net/posts/webdav-with-curl/ und http://www.qed42.com/blog/using-curl-commands-webdav

"-D -" response header auf Konsole

- X Specifies a custom request method to use when communicating with the HTTP server. The specified request will be used instead of the method otherwise used (which defaults to GET). Read the HTTP 1.1 specification for details and explanations. Common additional HTTP requests include PUT and DELETE, but related technologies like WebDAV offers PROPFIND, COPY, MOVE and more.

curl -D - -X PROPFIND -u Thommie2 https://www.netzwissen.de/owncloud/remote.php/dav/files/youruser/
curl -D - -X OPTIONS -u thommie3 https://www.netzwissen.de/owncloud/remote.php/dav/
Enter host password for user 'thommie3':

HTTP/1.1 200 OK
Date: Mon, 05 Feb 2018 16:08:56 GMT
Server: Apache
Strict-Transport-Security: max-age=31536000; includeSubDomains
Set-Cookie: 52401d632a450=fs2o0croo0o9dqj2b6ue5vlq15; path=/owncloud; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: oc_sessionPassphrase=1cuH7Tz0WoR9X44cdBO5AYMS6nH9OoBaKFqWHmpIeq4KLhQ9I8WKqaEpLEZ%2BIRmDujINE5t%2FE%2FVEBfr9VFVCI7t9C26wKZJMHqZc6LvQfXtfdodomilxPHTtCdgt8waN; path=/
owncloud; secure; HttpOnly
Content-Security-Policy: default-src 'none';
Set-Cookie: 52401d632a450=5m0s240q947g04ceutp85p19d6; path=/owncloud; secure; HttpOnly
Set-Cookie: cookie_test=test; expires=Mon, 05-Feb-2018 17:08:56 GMT; Max-Age=3600
Allow: OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT
DAV: 1, 3, extended-mkcol, access-control, calendarserver-principal-property-search, calendar-access, calendar-proxy, calendar-auto-schedule, calendar-availability, calendarse
rver-subscribed, oc-resource-sharing, oc-calendar-publishing, calendarserver-sharing, addressbook
MS-Author-Via: DAV
Accept-Ranges: bytes
Content-Length: 0
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
X-Robots-Tag: none
X-Frame-Options: SAMEORIGIN
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Content-Type: text/html; charset=UTF-8

CALDAV

https://tools.ietf.org/html/rfc4791

CARDDAV

https://tools.ietf.org/html/rfc6352

Test mit cadaver

cadaver Setup

less .netrc

default
login %login%
password %password%
.netrc lines 1-3/3 (END)

less .cadaverrc

open https://www.netzwissen.de/owncloud/remote.php/dav/

list collections

dav:/owncloud/remote.php/dav/> ls
Listing collection `/owncloud/remote.php/dav/': succeeded.
Coll:   addressbooks                           0  Jan  1  1970
Coll:   avatars                                0  Jan  1  1970
Coll:   calendars                              0  Jan  1  1970
Coll:   comments                               0  Jan  1  1970
Coll:   customgroups                           0  Jan  1  1970
Coll:   files                                  0  Jan  1  1970
Coll:   principals                             0  Jan  1  1970
Coll:   public-calendars                       0  Jan  1  1970
Coll:   systemtags-relations                   0  Jan  1  1970
Coll:   systemtags                             0  Jan  1  1970
Coll:   uploads                                0  Jan  1  1970

COMMAND REFERENCE

ls [path]

List contents of current [or other] collection

cd path

Change to specified collection

pwd

Display name of current collection

put local [remote]

Upload local file

get remote [local]

Download remote resource

mget remote…

Download many remote resources

mput local…

Upload many local files

edit resource

Edit given resource

less remote…

Display remote resource through pager

mkcol remote…

Create remote collection(s)

cat remote…

Display remote resource(s)

delete remote…

Delete non-collection resource(s)

rmcol remote…

Delete remote collections and ALL contents

copy source… dest

Copy resource(s) from source to dest

move source… dest

Move resource(s) from source to dest

lock resource

Lock given resource

unlock resource

Unlock given resource

discover resource

Display lock information for resource

steal resource

Steal lock token for resource

showlocks

Display list of owned locks

propnames res

Names of properties defined on resource

chexec [+|-] remote

Change isexecutable property of resource

propget res [propname]

Retrieve properties of resource

propset res propname value

Set property on resource

set [option] [value]

Set an option, or display options

open URL

Open connection to given URL

close

Close current connection

quit

Exit program

unset [option] [value]

Unsets or clears value from option.

lcd [directory]

Change local working directory

lls [options]

Display local directory listing

lpwd

Print local working directory

logout

Logout of authentication session

help [command]

Display help message