Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I attempt to copy a folder from a webdav server to a local disk using Nautilus, it copies what appeas to be a manifest file (xml with the directory listing etc..). With cadaver I get an empty file.

I would like to be able to recursively copy a whole directory tree. Does anyone know how I can do this?

ps: I'm using Ubuntu 11.04 with Nautilus and Cadaver 0.23.3

share|improve this question
Do you need a tool with a GUI or is wget "good enough" for you? – Ocaso Protal Feb 14 '12 at 7:26
I had a peek at wget, and it didn't claim to do webdav... It would work for me if it did – drevicko Feb 14 '12 at 7:35
Try this: wget --user={username} --password={password} --wait=20 --limit-rate=20K -r -p -U Mozilla http://{website} If it works Ill add it as an answer ;) – Rinzwind Feb 14 '12 at 7:52
But webdav is just plain https, so wget should work. a quick google search gave me… to get a quick overview over wget with webdav – Ocaso Protal Feb 14 '12 at 7:58
interesting.. when I point it to a webdav directory/collection, it grabs the html file for that directory (ie: with the list of things there as a webpage) then complains: "localhost/webdav/calibre-library: Not a directorylocalhost/webdav/calibre-library/index.html: Not a directory". When I point it at the webdav root, its rather random... ends up starting to download the whold webserver.. Note that it's https only and self-signed, so I had to add '--no-check-certificate' – drevicko Feb 14 '12 at 8:08
up vote 3 down vote accepted

This answer summarises suggestions given in comments by @Ocaso and @Rinzwind.

I used this:

wget -r -nH -np --cut-dirs=1 --no-check-certificate -U Mozilla --user={uname} 
    --password={pwd} https://my-host/my-webdav-dir/my-dir-in-webdav

Not perfect (downloaded lots of 'index.html?C=M;O=D' and the like) but otherwise worked ok.

The "-r" downloads recursively, following links.

The "-np" prevents ascending to parent directories (else you download the whole website!).

The "-nH" prevents creating a directory called "my-host" (which I didn't want).

The "--cut-dirs=1" prevents creating a directory called "my-webdav-dir".

The "--no-check-certificate" is because I'm using a self-signed certificate on the webdav server (I'm also forcing https).

The "-U Mozilla" sets the user agent in the http request to "Mozilla" - my webdav server didn't actually need this, but I've included it anyway.

share|improve this answer

Actually with Cadaver you can cd to directory from which you want to download files and mget *.

share|improve this answer
For this to be a useful answer, you need to tell the user how to do this. – RolandiXor Sep 25 '12 at 19:20
Hm, mget * . in a folder or mget foldername results in 501 Not Implemented. Did it really work for you on – Wurstsalat Jan 7 at 11:22

You can use dav2fs to mount the webdav server, and then you can access it as you would a local directory.

share|improve this answer
also use this method, easy access to files and folders – bobbyrne01 Nov 4 '14 at 11:32
And this method is the slowest in comparison with others and won't always work (bugs related to filename-squirks). – Wurstsalat Jan 7 at 11:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.