webDAV for dummies


#1

I searched the DH KB and googled around a bit but didn’t find a really good overview from the amateur’s perspective. Just for fun I created a test directory, enabled it for webdav through the panel, added a user/password, and then tried to set up an XP ‘network place’ pointing to that directory using the aforementioned user/pass. No go. I get an email from the system telling me that my attempt to set .htaccess permissions (?) failed since I don’t own the directory. Indeed, the directory, after webDAV-ification is owned by apache and I can’t ‘touch’ or create a file or do anything in the directory from the shell. WebDAV may be one of those “Harley Davidson” things where “If you have to ask, you wouldn’t understand” but still, I remain curious. Anyone care to give a practical overview for the barely literate web-stumbler?


#2

Unfortunately, it doesn’t look like our WebDAV setup works with Windows XP yet. It currently only works for calendar sharing using either Apple’s iCal or Mozilla Calendar. Other calendar applications may work as well.

We are currently working on expanding our WebDAV support to include Windows and Mac OS X (which is not working as advertised).

  • Dallas
  • DreamHost Honcho

#3

An UPDATE:

It appears as if it does work with at least some versions of Windows XP. I added a network drive and it mounted it and I was able to read and write the files in it. There may still be some strangeness that needs to be addressed, but it seems to at least partially work at the moment.

Windows 2000 has not been tested, but it does appear to have WebDAV support built-in so it may work.

  • Dallas
  • DreamHost Honcho

#4

So can you explain what you did in Windows XP to mount the drive?


#5

I think Dallas may already be out of town for the weekend, but he said he just added it as a network drive, and put the HTTP URL as the address. I don’t run Windows, so I can’t test it out myself.


#6

I added a WebDav directory but since I couldn’t mount it in OS X (using ‘Connect to Server’) I deleted it. Now that directory is still owned by dhapache:dhapache and I can’t touch it. Is this a bug or a feature?

I need access to this dir rather soon so any help would much appreciated.

Randy


#7

I have setup a webDAV directory yet Mozilla cannot connect to it to publish a calendar. and yup, I cannot do anything about it using a shell either.


#8

Hey haggis, I was just about to post re: the same problem, then I saw your post here… Mine’s also owned by dhapache; I don’t want to delete it, but I did possibly want to rename it for obfuscation purposes (it’s a pMachine script folder), and I can’t do anything other than work with the files in there already …


#9

One thing that might work (for getting rid of the files) would be to write a little PHP script to delete them.

Alternatively, you can just write support and ask them to remove it. Hopefully Dallas or Josh can comment further on the WebDAV specific issues.


#10

I can’t speak for haggis or anyone else, obviously, but I actually don’t want to get rid of any files at the moment; I just would like to have the owner of the directory in question changed back to myself :slight_smile:

Enabling WebDAV apparently changes the directory owner to dhapache, which I noticed after the fact (I presume it has something to do with adding the password-protection via .htaccess and .htpasswd), but didn’t really think about it. After I removed the WebDAV enabling for that directory in the Panel, I noticed it was still owned by dhapache – I just assumed it would have switched the ownership back …

If there’s a specific person to deal with WebDAV and they’re out for the time being, I myself can wait a bit :slight_smile:


#11

WebDAV works via an Apache module, so files it creates are owned by the Apache user, and directories it manages need to be owned by this user.

You could rename the directory, recreate it (as your user) and then copy the contents of the old directory to the new one… or you could just write support and have them chown it for you.


#12

yeah…the PHP script won’t work. I tried rmdir() and I get a permission denied. So, I guess it’s an email to support.

Thanks for the iead though.

r.


#13

Don’t REmove it… move it and then recreate it, and copy the files. e.g.:

% mv foo foo2
% mkdir foo
% mv foo2/* foo/

You won’t be able to remove foo2, but you can clean that up later.


#14

I tested publishing a calendar via Mozilla Calendar under Win XP (in VirtualPC in OS X) and it did work. What method are you using?

Also, once a directory is set up for WebDAV, you will not be able to manage it or the files in it using any other method because it must be writeable only by the apache user (dhapache in our case). That’s a downside of WebDAV, unfortunately.

In theory, the permissions could be set up so you could manage the files yourself and also use WebDAV, but it would be extremely sensitive to changes and would almost definitely break soon and often. It’s one of those ‘bad ideas’.

  • Dallas
  • DreamHost Honcho

#15

Windows XP support is not yet there. It seems to work in some situations, but not most. I have already gotten it working in a test situation, but the full implementation is awaiting another minor change being worked on right now. It will be working for Win XP web folders in the next couple of weeks.

  • Dallas
  • DreamHost Honcho

#16

you’re the man, dallas. I look forward to using the service.


#17

webDAV is working great for me from RedHat Linux 9. After I used the webDAV control panel to create a new password protected webDAV directory, I could access my new webDAV folder from Nautilus and Mozilla 1.4.

Nautilus as a drag and drop file transfer tool:
Open a Nautilus window
In the Location: edit box, enter the URL for the directory, e.g., http://www.wombatnation.com/davtest
Open another Nautilus window
Navigate in the second Nautilus window to desired directory on your local file system
Drag files from the second window to the first

Mozilla as an online file editor:
Launch Mozilla
Go to the webDAV-enabled directory
In the Mozilla File menu, select Edit Page
You can now edit the page in Composer (click on the Source tab if you want to directly edit the source)
When you are finished editing, click Publish
In the Publish Page dialog, re-enter the filename
Click the Publish button

I’m not sure why it doesn’t default to the same filename.

When you publish the page, you can move it to a new directory on your website, or to a different website entirely.


#18

We have not yet made the official announcement, but WebDAV should now be working correctly in all clients in Windows (98, ME, 2000, XP) and MacOS (9 and X).

  • Dallas
  • DreamHost Honcho

#19

Is it possible for the webdav directories to be world or group readable?

Or maybe there a better solution that I just don’t know about…

here’s the situation:

I’m using a webdav directory to publish an ical .ics file.

I also have a set of php scripts I found that will create a nice web-based calendar from an .ics file.

The php scripts which are in another directory in my account, can’t seem to read the ics file out of the webdav directory (permission denied).

Any suggestions?

–Brian


We are the music-makers, and we are the dreamers of dreams.


#20

From what I gather, when you upload a file using WebDAV, there are only two ways to read it: WebDAV and HTTP.

So your scripts would have to fetch the file by HTTP instead of trying to open it directly.

:cool: Perl / MySQL / HTML+CSS