Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Install a command-line WebDAV client UNIX
I ran into this quite by accident -- a CLI WebDAV Client called Cadaver. You will of course need the Developer Tools installed to make and install Cadaver.

Read the rest of the article for the instructions...

Download, Make and install:
% cd ~/src 
% curl -O
% tar xvfz cadaver-0.19.1.tar.gz
% cd cadaver-0.19.1

# The standard ./configure will do fine, but I chose to enable ssl and
# netrc (explained later)

% ./configure --with-ssl=/usr/local/ssl --enable-netrc

# I had one problem with the make and I think it relates to the ssl, so if you
# perform a standard ./configure without the ssl you may not get any errors like
# like I did. The error I was getting involved a header file called parser.h
# ne_xml.c:61: parser.h: No such file or directory
# I located a copy of parser.h in my Fink directory and I just copied it over
# into the src directory and it worked:

% cp /sw/include/libxml2/libxml/parser.h /Users/cposey/Src/cadaver-0.19.1/libneon

% make
% sudo make install
That's it - installed. If you only plan to use WebDAV with iDisk, you might as well leave off the SSL in the configure as iDisk (as far as I know) is not SSL enabled.

Using Cadaver

When I first fired up cadaver I tried:
% cadaver
It seemed to work fine, it asked for my username again and then for my password, but whenever I tried to access any of the directories on the iDisk, it failed. Then I read of an option in the cadaver man pages:
-t, --tolerant
Allow cd/open into non-WebDAV enabled collection;
use if the server or proxy server has WebDAV com-
pliance problems.
So I tried again:
% cadaver -t
I then entered my username and password at the prompt, and it worked perfectly!

Automated iDisk Login

Here's a little trick I picked up off the Unix Guru Daily Tip Mailing List (HIGHLY RECOMMENDED!). Create a file in your home dir called .netrc:
% pico ~/.netrc
Enter the following info in .netrc:
login user [replace user with real username]
password pass [replace pass with real password]
Then save the .netrc. Now you have to make sure the .netrc is owned by you and also has ONLY read and write permission for you only. Otherwise it will fail:
% chmod 600 .netrc
Ok - now you have all your login info in the .netrc file, basically what it say is when you connect to server MACHINE, use the info below to access it. In this case the username and password. You bypass the prompt. So to use cadaver and the .netrc file to auto-login to your idisk you enter:
% cadaver -t
Replace "username" above with your actual iDisk username. You should be automatically connected and logged in. This could of course be put into scripts, cron jobs, etc.

Misc Notes About Using Cadaver
  • Cadaver (and probably WebDAV are case-sensitive) this means if you want to access your "Sites" dir on your idisk - you MUST enter:
    % cd Sites
    If you enter "cd sites", you will get an error msg.

  • After connecting and at the dav:> prompt type "help" for a list of commands
[Editor's note: I have not tried this myself.]
  • Currently 4.50 / 5
  You rated: 5 / 5 (4 votes cast)

Install a command-line WebDAV client | 9 comments | Create New Account
Click here to return to the 'Install a command-line WebDAV client' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Fink has a cadaver package
Authored by: froz on Jun 25, '02 02:18:44AM
There is a package for 0.19.1 in the Fink unstable tree. The Fink package gives you readline, SSL, neon and anything else you need. There are good instructions for using the unstable tree on the Fink KDE page. In this context, unstable does not mean what most people seem to assume it does.

[ Reply to This | # ]
A source package
Authored by: froz on Jun 25, '02 02:25:38AM

I forgot to say the Fink package is a source package, so you will still need to have the Developer tools installed.

[ Reply to This | # ]
Authored by: bhines on Jun 25, '02 06:36:22AM

Why go to all the trouble? Install fink, then "fink install cadaver-ssl".


[ Reply to This | # ]
Thanks - Fink!
Authored by: bluehz on Jun 25, '02 07:42:13AM

Great info on the Fink install! I have just started using Fink, I have been manually building for a while now. I guess I didn\\\\\\\'t even think of checking fink when I found this the other day.

[ Reply to This | # ]
this does not compile on Jaguar
Authored by: macubergeek on Nov 14, '02 10:12:50PM

I presume the code is buggy

jamesk @ /Applications/cadaver-0.19.1@Xmac-->make
gcc -DHAVE_CONFIG_H -I/sw/include/libxml2 -I/sw/include -I. -I./lib -I./src -g -O2 -I./libneon -o src/cadaver.o -c src/cadaver.c
src/cadaver.c:686: only 2 args to macro 'NE_DEBUG' (3 expected)
cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode
make: *** [src/cadaver.o] Error 1

[ Reply to This | # ]
this does not compile on Jaguar
Authored by: froz on Nov 15, '02 02:19:05AM

Actually, your presumption is buggy :) Install it from fink as suggested above, or instead of building an old version, get the latest (0.20.5) from

[ Reply to This | # ]
this does not compile on Jaguar
Authored by: macubergeek on Nov 16, '02 09:12:21AM

Yeh yer prolly right ;-)
I did exactly as you suggested, installed from fink
works fine
You know this command line webdav thingie is kinda cool isnt' it?

[ Reply to This | # ]
Authored by: macubergeek on Nov 16, '02 09:20:32AM

sorry I was right the first time
I downloaded the newest version and it STILL DOSN'T COMPILE FROM SOURCE UNDER JAGUAR
sw/lib -liconv -lm
/usr/bin/ld: Undefined symbols:
make: *** [cadaver] Error 1
jamesk @ /Users/jamesk/Desktop/cadaver-0.20.5@Xmac-->

Ironicly it does compile and install flawlessly under fink
I can only conclude its a prebuilt --fixed-- binary
the source probably compiled fine under 10.1 but broke under the 10.2 changes particularly the change to gcc 3.1

[ Reply to This | # ]
Install a command-line WebDAV client
Authored by: DMCrimson on Apr 24, '03 01:49:39PM

I managed to compile this under 10.2.5, there were some XML-related troubles on the make phase, but installing expat separately solved them...
STEPS (assuming you work in some default directory...):

1-Install expat:
get the sources: curl -O
tar xvfz expat-1.95.6.tar.gz
cd expat-1.95.6
sudo make install

2 - install cadaver
as in original hint, but rather configure as follows:
./configure --with-ssl --enable-netrc --with-expat
--with-expat will find the freshly installed libs... and make will succeed...

[ Reply to This | # ]