Personal tools
You are here: Home Documentation How-tos Using WebDAV
Support

Get Help

Join our chat rooms or support forums if you have more specific questions.

Plone Training
Learn how to design, build, and deploy a website in Plone through one of the numerous Plone training sessions around the world.
Find Plone training…
 
Document Actions

Using WebDAV

This How-to applies to: Any version.
This How-to is intended for: Site Administrators

Mounting a Zope/Plone site with WebDAV is a great way to manage content. This howto explains how this can be done in various operating systems.

About this document

First, this document introduces WebDAV as a concept and it's relation to Plone, including how to set it up. We continue by giving examples on what to use WebDAV for. Finally, we give examples and step-by-step guides on how to use WebDAV from Windows and in particular NetDrive, OS X and Linux. We conclude with a short list of known bugs and caveats.

What is WebDAV?

WebDAV is a way to mange files over HTTP, an extension to the normal protocol of the World wide web. You can think of it as something in-between FTP and a network share on your local network.

WebDAV is becoming the de facto standard for managing web content. Zope provides WebDAV, but usually on a different port to avoid the confusion between editing the source documents (the real content) and the presentation view of the documents (the HTML with menues and portlets normally sent to web browsers).

By mounting your Plone site, you can manage documents and folders almost as easy as if it was there on your local machine.

Enabling WebDAV in Zope

You must enable the WebDAV port in your Zope config to use it. Add the following to zope.conf:

<webdav-source-server>
# valid keys are "address" and "force-connection-close"
address www.mydomain.com:1980
force-connection-close off
</webdav-source-server>

This will enable the WebDAV server on http://www.mydomain.com:1980/. Note that you cannot use this URL in your web browser, just in WebDAV clients. Using the web browser will give you an error message AttributeError: manage_FTPget. You could also just run the WebDAV server on localhost with address 1980, forcing you to either use a WebDAV client locally or proxy WebDAV through Apache.

A way to cope with the port problems with Zope is to use Apache's Rewrite rules to ProxyPass the URL /dav or a seperate vhost dav.site.com to the seperate WebDAV port, usually 1980. This way, clients can use just http://www.site.com/dav/ or http://dav.site.com/. This makes it possible to access WebDAV even from behind a strict firewall.

You will have to find out what the URL to your WebDAV service will be. In this document, the URL http://plone.s11.no/dav/felles/s11 will be used as an example. This is a rewrite /dav on the vhost plone.s11.no, and felles/s11 is the path to the Plone instance inside Zope, as shown in the Zope management interface /manage. By using the full path to the Plone instance WebDAV clients can log in using the normal Plone user instead of the global zope user.

What should I use it for?

One obvious answer: Save Word documents straight onto the Internet. This will make your boss go wild. Since the Plone site mounts as a regular drive, you can just drag over whatever old files you have laying around. If you dear to try out the PortalTransforms product, you can have features like HTML previews of documents, and even index them so that you can use the regular Plone search for finding content inside the documents.

If you use the gallery product CMFPhoto, you will discover that with WebDAV uploading photos is just a matter of drag and drop. In fact, you can drag a complete folder right into your CMFPhotoAlbum, and it will appear on the web immediately, complete with thumbnails. And the other way around, if you browse your mounted gallery folder, you can turn on thumbnail views and move/delete images from there.

Another way to use the WebDAV mounting is for editing existing content. You will however discover that not everything is good in the WebDAV land. Many applications will for instance do saving in the fashion of delete-old-file-and-create-a-new-one. This will obviously discard meta information stored in Zope, such as discussions and publishing information. Other programs create temporary files that can be hard to get rid of. You will have to try out which programs behave nice, and which don't. You can always drag-and-drop files back and forward as a backup solution.

WebDAV in Windows

Windows does have a built-in WebDAV client in XP and 2003 Server. To use it, open My network places and click Add network place. Enter the WebDAV URL. You will however notice that this WebDAV support is rather crappy, as it only supports browsing from inside Explorer. The Plone site is not mounted as a real network drive, like P:. There might also be problems with authenticating if your Windows computer is in a domain, to work-around this, include the username in the URL, like http://username@plone.s11.no/dav/felles/s11. With the built-in client, all you can do is drag and drop files back and forth, and there are several other problems. Is there no better way?

Well, there is, but through seperate programs. One of those programs are WebDrive. What this program does is to mount a WebDAV site as a seperate drive, like Z:. Then, any program can be used almost as usual. However, WebDrive costs money, so it would require Plone providers to buy a license for each seperate user at each customers site.

Now, Novell has released silently their WebDAV client for Windows, called NetDrive. The client is marketed as a way to connect to Novell iFolder. But in reality the client also works against FTP, SFTP and WebDAV sites. We only need WebDAV, and the good part about NetDrive is that it's free!

Using NetDrive

Here are some screenshots. Mounting is easy, as long as you know the URL for your WebDAV server:

Mounting WebDAV with NetDrive

This gives a normal drive W: that can be browsed through Explorer, from where you can use whatever program you feel is appropriate to edit your web content:

Browsing a mounted site

As NetDrive provides a real drive, you can also save files directly from most programs. You will have to experiment with this, though, as applications save files in the most peculiar ways, using temporary files and other tricks that might mess up your Plone site.

WebDAV in OS X

Unlike Windows, Apple has made the built-in support for WebDAV in OS X really good. Here's a step-by-step guide on how to connect to your Plone site from OS X.

Click Finder or on the desktop. From the Finder menu, select Go -> Connect to Server.
Go -> Connect to server

This will bring up a prompt for your server address. Fill in the URL, and press the + button to save it as a favourite.
Server address

Next, fill out your username and password. You can chose to save the password.
Login prompt

Finally a Finder window will appear with your Plone site mounted. An icon for the site will also be available on your desktop.
Finder view of Plone site

Note that you don't only see documents and images on your site, but also different metafiles and -folders, like portal_properties and plone_utils. The reason you see all these extra files is that WebDAV is a "source" view, almost like the Zope management interface (ZMI). It is advised not to try managing such files and folders through WebDAV.

As OS X has native support for mounting WebDAV, you can of course use the Terminal and access your site through the shell.
Shell browsing
Using the shell permits allows some fun, such as using grep and find. Note though that this is not a normal filesystem, so some things will not work. For instance, the df disk free command is rather confused.

WebDAV in Linux

Linux and other UNIXes don't have a common way to mount WebDAV, although there exists attempts to mount WebDAV as a filesystem, davfs is one such solution for Linux.

Other typical Linux desktop environments have their internal WebDAV support. For instance, KDE supports WebDAV by just using URLs that start with webdav:// instead of http://. For HTTPS, use webdavs://.
WebDAV in KDE

The Gnome file browser Nautilus also has WebDAV support in recent versions, using normal URLs with http://

Bugs and caveats

WebDAV support in Plone is not flawless yet, and there is some things you must be aware of. The WebDAV mounting of a Plone site is not a regular network share, it's a view into the source code of your site. Not all file types might work. Try to avoid large files.

You might experience problems with temporary files and locking, not all applications will work good with saving directly to the site. Zope exposes many internal Plone folders and objects that shouldn't be edited through WebDAV. Meta information is added to HTML and TXT documents as seperate <meta> tags or text lines and can be edited. Special content types might not work well, for instance if you use ATContentType you will experience several bugs.

by stain — last modified January 30, 2007 - 22:26 All content is copyright Plone Foundation and the individual contributors.

Fun with Windows

Posted by Marc Mengel at June 14, 2006 - 16:14

I read a link over at zorched.net:

http://www.zorched.net/2006/03/01/more-webdav-tips-tricks-and-bugs/

Which pointed out that in Windows, Webdav support is at least different once you install Office, but that that code doesn't work right unless you send a custom HTTP/Webdav header:

MS-Author-Via: DAV

in response to OPTIONS commands. I added some changes in the Zope code, in zope-2.8.4/lib/python/webdav/Resource.py in the OPTIONS subroutine, add: RESPONSE.setHeader(MS-Author-Via, DAV) and in manage_DAVget change the return manage_FTPget() call to: try: res = self.manage_FTPget() except: self.manage_FTPget({},{}) return res So far, I seem to have WebDAV working with the Office webdav client code on Windows...

Unable to connect using Web Folders

Posted by Brad Lofton at September 14, 2006 - 16:19
I have yet to get what is described above...I can set up a network folder on my desktop using plone's FTP server, but whenever
I add a network place to use webdav, I get an error message stating "not a valid folder", or it simply hangs. I have tried literally every permutation of a URL possible even entering my user name and password to the URL; nothing works. I either gives an error message, or simply hangs up. Has anyone experienced this?

The patches above fix webdav for Windows XP

Posted by Tom Hallam at January 25, 2007 - 06:59
Just tried those patches on Zope 2.9.6. Pre patch I was getting the same errors as briofton. Post patch it works :)

Still broken for Ubuntu (Nautalis?)

Need more details, please

Posted by David Chase at February 6, 2007 - 17:14
"and felles/s11 is the path to the Plone instance inside Zope, as shown in the Zope management interface /manage"

How is this "shown", exactly? I went to both ".../manage" and ".../manage_main", and though I am sure that there might have been a path in there somewhere, I spent a while looking and did not find one.

Sample details that worked for me

Posted by David Chase at February 8, 2007 - 04:56
One thing I had to do was enable DAV permissions at
http://localhost:8080/Plone/manage_access (or click Security tab at /Plone in the ZMI).
Scroll down, find WebDAV Lock/Unlock items and WebDAV access, and let some users do DAV (or not). (Also useful for enabling ZWiki; why doesn't this get mentioned in the instructions? An admin-only wiki is pretty stupid.)

Once that was done, I could do DAV as dr2chase to
http://localhost:1980/dav/Plone/Members/dr2chase, and that seemed to work ok.

If, as dr2chase, I attempted to access a place I did not have write permission, such as http://localhost:1980/dav/Plone, I was repeatedly asked for my password. So, don't do that.

Vital info for getting WebDAV to work in Windows XP

Posted by Nick Davis at February 28, 2007 - 12:05
A colleague found this :

Some Windows XP machines have a broken Web Folders installation. Microsoft includes a Web Folders repair utility built in to Windows to correct the problem. Use the following steps to fix the problem:

1. Click on the "Start" menu in the lower left corner, and select "Run..."
2. Type in "webfldrs.msi" and click the "OK" button.
3. Click on the "Select reinstall mode" button.
4. Select *ALL* of the checkboxes *except* for the second one ("Reinstall only if file is missing").
5. Click on the "OK" button.
6. Click on the "Reinstall" button.
7. After the reinstallation is complete, reboot the computer.

Source : http://chapters.marssociety.org/webdav/ - cut & pasted here just in case that site ever goes down.

Without it, WebDAV wouldn't work at all for us. The msi file is already there on your box BTW, you don't have to download anything.

After doing this I got to Plone by "open location" (Ctrl-O in IE6 or IE7 ), typing in "https://oursite.le.ac.uk:1980", (in our case we Apache proxy to give secure WebDAV), selecting the checkbox marked "Open as Web folder".

Then an irrevelant and confusing "My Computer" window appears. ;-) No worries, click "My Network Places" and the Plone site is listed there. Click that, and the Plone site appears as a directory structure and you can drag'n'drop into Plone.

This is easier than telling all your users to install Netdrive. And BTW Netdrive while it installs happily if you've admin access on your box, for us refused to work with 2 different ways of packaging up Windows software.

Further troubleshooting info

Posted by Nick Davis at March 6, 2007 - 14:50
Other things to check if WebDAV (from any platform) doesn't work:

1. On Plone 2.1, have you installed DavPack? This fixes a lot of stuff. Downloadable from Enfold : http://www.enfoldsystems.com/Products/Open/DavPack

2. Is your content_type_registry intact? Check in ZMI. If it got broken somehow (this can happen as result of reinstalling CacheFu for example) you can temporarily create a new Plone site in your Zope instance and copy the content_type_registry from that site into your old Plone site.

3. Is mimetypes_registry intact? In ZMI, are icons broken or are they OK? I found Mimetypes often gets broken when reinstalling 3rd-party products or migrating. Simply uninstalling & reinstalling Mimetypes will fix this.

Another option

Posted by Enfold Systems at May 15, 2007 - 19:26
If you've tried all of the above and still need something better, give Enfold Desktop a look:

http://www.enfoldsystems.com/Products/Desktop

It's the only WebDAV utility made specifically to work with Plone. Version 3 is free for up to five users.

:-)

Chris W.
Enfold Systems

Some other hints . . .

Posted by Brian Johnson at October 17, 2007 - 05:04
WebDAV and FTP in zope share some drawbacks with respect to file names. File names that would otherwise be converted using ATFile to something sane are not through FTP or DAV. For example, filenames containing & + ; , will fail to upload. Another thing to be aware of is that if you are doing heavy indexing, especially full-text indexing as with TextIndexNG3, the webdav timeouts afforded by common WebDAV clients may not be sufficient. Many FTP clients will allow setting the timeout values as a possible workaround.

Ubuntu WebDav

Posted by unset at December 28, 2007 - 19:02
I figured out how to do this with the latest Plone version in Ubuntu (I'm new to both Linux and Plone).

Go to the zope.conf file (check under Plone-3.0.4/zinstance/etc) and remove the comment #s around the <webdav-source-server> tags.

Next, restart zope and check http://localhost:8080/manage in Control_Panel, make sure you see:
Network Services
ZServer.HTTPServer.zhttp_server (Port: 8080)
ZServer.HTTPServer.zwebdav_server (Port: 1980) <<<<<<<<<<<<<<<<

Next, go into plone and give the permissions in http://localhost:8080/Plone/manage_access putting check-marks on WebDAV access, lock and unlock items.

Open up the Nautilus file manager. File > Connect to Server. Choose Custom Connection. For the URL put 'dav://localhost:1980/Plone' and name the connection. Double-click the new icon, you should see your Plone site in folders.

Errors

Posted by unset at December 28, 2007 - 20:56
Seeing is believing but not working. The errors using this method made me resort to FTP which works fine. The steps are almost identical except you want an FTP connection instead of custom.

WebDav behind Apache

Posted by James Barwick at March 7, 2008 - 05:49
Ok, I'm stupid...but I've done the following:

ProxyPass /portal/dav webdav://localhost:8090

#RewriteRule ^/portal/dav$ webdav://localhost:8090
#RewriteRule ^/portal/dav/(.*) webdav://localhost:8090/

(tried various things)....

And, I still get "file or folder webdav://myserver/portal/dav does not exist"

I have temporarily punched a hole in my firewall and can sucessfully login to webdav://myserver:8090 and also navigate to webdav://myserver:8090/portal/dav (I created these subdirectories with my webdav client).

Through apache...no go. I've combed the Net (perhaps not hard enough). But if we could get some examples, it would be helpful.

For any issues with the web site functionality, please file a ticket.

Please consult the policy on plone.org content if you want your content published on this site.

Servers and hosting by