Purpose of WebDAV?


One of the reasons I became a DreamHost customer was because of the WebDAV support, which is extremely rare among hosting providers at this price. I wanted to be able to mount my website as if it were a local drive on my Mac so that I could easily edit and add files. After enabling WebDAV on a directory, however, I discovered a problem: I have to password-protect the directory to prevent others from editing it, but in order for others to view it, I have to remove password protection. Because of this Catch-22, there seems to be no way of giving me write access to the directory while allowing read-only access for everyone else. For this reason, WebDAV is pretty much useless to me.

Am I missing something? What do other DreamHost customers use WebDAV for?


You don’t have to password protect it (.htaccess password protect). Just make sure not to check the password protect button when you set it up.

But I wouldn’t really use webdav for that anyway. Scripts and such cannot run inside a webdav directory (or that’s what I’ve heard, haven’t tried it though).

Promo Code: WJD50 - $50.00 off any new DreamHost plan


[quote]You don’t have to password protect it


Right, but then anyone could modify and delete files. That’s certainly not what I want. I just want to allow read/write privileges for myself and read-only privileges for everyone else. I know this is possible because Apple’s .Mac service is set up this way, and they use WebDAV.

[quote]But I wouldn’t really use webdav for that anyway.


What would you use it for?


When you set up a WebDAV directory, write access to it is always restricted to the users you configure. The password protection option is for when you also want to restrict read access. The latter is good for sharing private calendars with other people, for instance. So, the answer is to not check the password protect box. Your files will still be safe!

Note though that WebDAV runs as apache so you won’t be able to run cgi scripts or manage the files in any way other than through WebDAV.

  • Dallas
  • DreamHost Head Honcho/Founder


Ahhh… it worked, thanks! I simply turned off the password protection, as you said, and specified a user account with a password, and everything worked just as I wanted: I could see the files in my web browser without a password, and if I tried to connect with a WebDAV client, it prompted me for a password and allowed me write access! Sweet…


I am having trouble setting up a system that I want. I have a php routine that takes an html form and puts it into a .pdf file. I want to write the .pdf file to a customer’s subdirectory that they will access by either FTP or WebDav (I’d prefer WebDav because the iPad app to handle pdfs does a good job with syncing thru WebDav.)

  • I tried setting this up using FTP but it won’t allow the owner and the customer to have equal write/read accesses to the customer’s folder while forbidding the customer from accessing higher directories where the php and blanks forms live.

  • I tried using WebDAV with no password protection, as stated in the above note, but it will not allow my php routine to write TO the directory set up for WebDAV. (when I turn WebDAV off, the routine writes perfectly, but then we are back to the FTP problems.)

How can I get this owner/customer model to work? I want to write the outputted pdfs to a Dreamhost folder, and really don’t want to involve Dropbox or Sugarsync. So far they are my only option for this to really work, but they introduce another link to break in the chain.

(the customer only needs to read, not write, but because the iPad’s “send to” renames the pdf file when sending it from Safari to the PDF app, I can’t use the .htaccess password scheme of protecting other customers from reading the pdfs in another customer’s folder)


WebDAV enabled directories can only be written to via WebDAV. This means you need a PHP WebDAV client library.


Does anyone use WebDAV on DH? I’ve never figured out a way to make my life easier by using it the way the DH implemented it…


It’s primarily intended for use by a few applications that can use it for storage — for instance, a bunch of iOS applications can save/open files stored on WebDAV. There are also some desktop apps which can use it for sync (e.g, OmniFocus).


i see. I’m going to go out on a limb here…

if it primarily aids in storage, not in building websites, then how is it being used by those apps in a way that conforms to the TOS? I’m not complaining at all. I know that DH is relatively relaxed compared with other hosts, but just curious. Wouldn’t this sort of encourage using accounts as personal backups?

Personally, I’d love to use WebDAV to work on websites, but I’ve never been able to get that working. SFTP seems to work fine though.