$web/etc/handler
$web/etc/passwd
WebDAV script for Pegasus is in http://plan9.aichi-u.ac.jp/netlib/lua/.
The name is "webdav" which is written in 9lua. (Lua with plan9 extension)
The WebDAV works for Mac/OSX, WinXP and optionally for Win2000. I have not examined other type of clients yet.
Win2000 client requires dirty codes in Pegasus. Therefore Win2000 support is only enabled by a compilation option
-DWIN2000DAVPegasus that compiled under this option will lose some of simple logical structure stated in this document.
You can use Digest authentication. Of course, you may not use authentication for debugging purpose.
My old WebDAV script was written in Perl. In releasing Pegasus 2.6, I have rewritten the script in Lua, because we have big advantages if we switch the scripting language from Perl to Lua:
9lua-5.2
lua-5.2
webdav
libp9.lua
libxml.lua
libdav.lua
9lua-5.2
is plan9 extension of Lua-5.2.
9lua
— Lua interpreter with extension for webdav/usr/local/bin/386/
webdav
/usr/web/bin/rc/
chmod 755 webdav
libxml.lua
/usr/local/lib/lua/5.2/
libdav.lua
/usr/local/lib/lua/5.2/
The following line in /usr/web/bin/rc/webdav controls webdav log.
-- LOG = io.open("/log/webdav.log","a") -- uncomment if you need logIf you want remove "
--
" at the beginning of the line.
The log is located at $web/log. ($web is your httpd root)
/log/webdav.log
may grow to huge size. So it is wise to comment out unless you need debugging.
In the explanation below, $web
is a httpd root of a user, and host
stands for "host
", "host:port
" or "host/~user
".
$web/etc/handler
/dav - * /bin/webdav /doc /dav/* - * /bin/webdav /doc
/dav - * /bin/webdav /dav /doc /dav/* - * /bin/webdav /dav /doc
Then your files in document space can be mounted as remote file system with URL:
http://your.host.com/dav/
You may replace "/dav
" by other "/bar
" and likewise you may replace "/doc
" by "/path/foo
". Thus you may have WebDAV storage out of document root.
$web/etc/passwd
arisawa 1ecdd023fbd3c3fe8f63b05827c0d38a /dav arisawa@herawhere
arisawa@hera
is my realm and the md5 value is obtained byecho -n 'arisawa:arisawa@hera:black cat' | md5sumfor password "
black cat
".
You need to make all files and directories in your document space readable/writable (and also executable for directories) for user web
.
I recommend you to use WebDAV only in your home network. The reason is
(1) security
(2) net work band width
OSX client of old version was slow because of incredibly stupid behavior of the client.
Now Apple has fixed this problem. Current WebDAV on Mac is acceptable level.
OSX client is slow because of incredibly stupid behavior of the client.
There are many issues on this subject in the Internet.
PROPFIND
request with Depth:1
except names in the collection. After the request, the client continues PROPFIND
requests to all names in the collection although the client already has received requesting information. Thus, if a collection has 100 files then 100 PROPFIND
requests continue in a short time.
OSX 10.4 should work as has been.
-DWIN2000DAV
http://host/dav?
You need "Software Update for Web Folders (KB907306)" so that Vista WebDAV client gets to work.
Microsoft gave up to support WebDAV as a file system in Vista. The design is degraded from that of WinXP.
However some things are improved:
(1) you need not "?
" magic such as
http://host/dav?in creating "Network Place".
?
" then Vista fails in creating Network Place.
(2) you need not host name "@host
" such as
alice@hostsin your user name.