Read the rest of the article for the instructions...
Download, Make and install:
% cd ~/srcThat'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.
% curl -O http://www.webdav.org/cadaver/cadaver-0.19.1.tar.gz
% 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
Using Cadaver
When I first fired up cadaver I tried:
% cadaver idisk.mac.com/usernameIt 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, --tolerantSo I tried again:
Allow cd/open into non-WebDAV enabled collection;
use if the server or proxy server has WebDAV com-
pliance problems.
% cadaver -t idisk.mac.com/usernameI 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 ~/.netrcEnter the following info in .netrc:
machine idisk.mac.comThen 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:
login user [replace user with real username]
password pass [replace pass with real password]
% chmod 600 .netrcOk - 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 idisk.mac.com/usernameReplace "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

