KB / Account Control Panel / Goodies :: Htaccess / WebDAV / WebDAV
From DreamHost
WebDAV stands for "Web-based Distributed Authoring and Versioning". It is a set of extensions to the HTTP protocol which allows users to collaboratively edit and manage files on remote web servers.
In simple terms, WebDAV allows you to work with your web files through the web server rather than using another protocol like ftp or ssh. Additionally, WebDAV provides a locking mechanism for files so groups of people can work together on the same set of files without bumping into each other. Unfortunately, not all WebDAV client applications support the locking.
WebDAV works well in some circumstances, but there are some caveats that should be known. All of the files and folders in a WebDAV enabled directory must be writeable by the user the web server is running as. In the DreamHost setup, that user is called 'dhapache'. If you enable a folder for WebDAV use, you will not be able to manage or edit the files it contains with any method other than WebDAV. Attempts to edit through ftp or the unix shell will fail. Additionally, our security setup on the shared hosting servers makes it so CGI scripts will not be able to execute from a WebDAV folder.
WebDAV clients are built into Mac OS X's Finder, as well as all versions of Windows since Windows 98. There are also WebDAV client applications for use in Mac OS 9. Many popular web editing tools such as Macromedia Dreamweaver and Adobe GoLive support WebDAV as well.
Parent Article
Sub-Articles
After installing XP SP2, WebDAV no longer works.
After installing Service Pack 2 for Windows XP, you will no longer be able to connect to your account using WebDAV.
DreamHost uses BasicAuth (basic authentication) to verify your username and password when you connect to your account via WebDAV. Service Pack 2 for Windows XP disables support for BasicAuth.
You can enable BasicAuth in SP2 by adding the following registry key and setting it to a non-zero value:
HKEY_LOCAL_MACHINE\SYSTEM \CurrentControlSet\Services\WebClient\Parameters\UseBasicAuth (DWORD)
See KB article at Microsoft [1]
Reboot your machine, and WebDAV will begin working properly. If you don't want to reboot for some reason, you can just restart the service.
Right click 'My Computer' Choose 'Manage' Select 'Services and Applications' -> 'Services' Scroll down in right panel and select 'WebClient' Restart the service
We are currently evaluating using options other than BasicAuth to resolve this issue. In the meantime, the workaround posted above will get the job done.
Click here to read more information on Microsoft's decision to disable BasicAuth.
Of Note: XP SP2 allows you to use port 80 which seems to allow BasicAuth, when stating the domain to connect to use http://www.domain.com:80/webdavfolder to connect. This was reported on the original knowledgebase and has been left out.
Setting Up WebDAV on Mac OS 9 using Goliath
Mac OS 9 does not natively support WebDAV folders, but there is a free client application that works very well. The application is called Goliath and it works in Mac OS X as well and supports some of the more advanced WebDAV features missing from the OS X Finder.
Goliath can be downloaded from http://www.webdav.org/goliath/.
Once it is downloaded, launch it and enter in your WebDAV-enabled folder http URL as well as the User name and Password you set up when you enabled WebDAV access, and then click ok. Note that the user info is not necessarily the same username and password you use for ftp or shell access.
Setting Up WebDAV on Mac OS X Using Finder
- From the Finder click Command(⌘) + K on the keyboard or use the menu item Go > Connect to Server.
- The Connect to Server window appears. In the Address: text box, type in the http url of your WebDAV-enabled folder.
- When prompted, enter the User name and Password you set up when you enabled WebDAV access and click ok. Note that this is not necessarily the same username and password you use for ftp or shell access. The WebDAV folder will appear in the Finder as a mounted volume. By default an icon will appear on your desktop. If it does not, your Finder is set to not display it on the desktop, and you will have to go through the Finder to see the WebDAV folder.
Setting up WebDAV on Windows 2000 or Windows XP
These instructions apply to Windows XP, but the process in Windows 2000 is similar.
- Open My Network Places from the Desktop. https://panel.dreamhost.com/kbase/images/illustrations/webdav-xp1.gif
- From your My Network Places folder, click 'Add a network place.' https://panel.dreamhost.com/kbase/images/illustrations/webdav-xp2.gif
- When asked where you want to create the network place, select "Choose another network location" https://panel.dreamhost.com/kbase/images/illustrations/webdav-xp3.gif
- In the 'Type the location of the Network Place' text box, enter in the http url of your WebDAV-enabled folder and click Next (To avoid connection issues when using XP SP2, add the port number to the url e.g., http://www.domain.com:80/webdav-folder/). https://panel.dreamhost.com/kbase/images/illustrations/webdav-xp4.gif
- Enter the User name and Password you set up when you enabled WebDAV access and click ok. Note that this is not necessarily the same username and password you use for ftp or shell access. https://panel.dreamhost.com/kbase/images/illustrations/webdav-xp5.gif
- In the 'Enter a name for this Network Place' text box, enter a name. The name Windows fills in for you is probably ok to leave as is.
- To complete your WebDAV setup, click Finish. A Microsoft Web Folder appears showing the contents of your WebDAV-enabled folder. Files in the WebDAV folder can be managed through the Windows Explorer just like any other file in your computer. https://panel.dreamhost.com/kbase/images/illustrations/webdav-xp6.gif
You may see two files in this directory - .htaccess and .htpasswd - when you connect to it. These files do need to be there and you won't be able to delete them, so they can safely be ignored.
Setting up WebDAV on Windows 98
- Double-click My Computer and then open Web Folders.
- Double-click Add a Web Folder.
- For location, input the http url of your WebDAV-enabled folder.
- When prompted for a User Name and Password, enter the User name and Password you set up when you enabled WebDAV access and click ok. Note that this is not necessarily the same username and password you use for ftp or shell access.
- In the Network Place text box, enter a name.
- To complete your WebDAV setup, click Finish. A Microsoft Web Folder appears showing the contents of your WebDAV-enabled folder. Files in the WebDAV folder can be managed through the Windows Explorer just like any other file in your computer.
Conflicts with Wordpress and other applications that write to .htaccess
Because Wordpress generates an .htaccess file, you may find that after you've set up the folder as WebDAV-enabled in the control panel, you can't connect to it from your remote location of choice.
For example, if you have a Wordpress installation at www.yourblognamehere.com and you want to enable WebDAV at www.yourblognamehere.com/sampleshareddirectory, you'll need to add this to the .htaccess in the site's root directory:
RewriteCond %{REQUEST_URI} ^/sampleshareddirectory/(.*)$ [OR]?
RewriteCond %{REQUEST_URI} ^/failed_auth.html$?
RewriteRule ^.*$ - [L]
Changing "sampleshareddirectory" to whatever your actual directory name is, of course.

