Geek Boy's blog
Sunday, March 06, 2005
  Fun with Windows XP and WebDAV
I have an apache server in my basement, and I host sites for a number of people, including this blog. I've tried to give WebDAV access to my clients, but have had all sorts of headaches with accessing Apache2 WebDAV from Windows XP. Windows XP is supposed to support WebDAV pretty nicely (they call it Web Folders), but it's broken in a number of places.

I think I've figured out how to fix that.

The symptom is that a user tries to add a Web Folder from the Windows XP "My Network Places" window, using a URL of the form http://my.site.com/mydirectory.

For discussion's sake, say that their name is 'user', and their password is passwd.

They get a WebDAV authentication window, and they enter their name and password. The authentication window will say "Connecting to my.site.com" in both the titlebar and the message above the username and password fields. The authentication window comes right back, with a username of the form my.site.com\user prefilled in. They enter their password again, and the authentication window comes right back. They can't get into the site. Even if you've got entries for both "user" and "my.site.com\user" in your apache passwd file, it's no good.

You'll see this sort of stuff in the apache access log:

10.0.0.3 - - [06/Mar/2005:15:28:54 -0600] "PROPFIND /mydirectory HTTP/1.1" 401 529 "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
10.0.0.3 - - [06/Mar/2005:15:28:54 -0600] "PROPFIND /mydirectory HTTP/1.1" 401 529 "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
10.0.0.3 - - [06/Mar/2005:15:28:54 -0600] "OPTIONS / HTTP/1.1" 200 - "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
10.0.0.3 - - [06/Mar/2005:15:28:54 -0600] "PROPFIND /mydirectory HTTP/1.1" 401 529 "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"

And interestingly, you'll see nothing at all in the error log.

The secret is to add a port number to the URL - for instance, use:
http://my.site.com:80/mydirectory
rather than
http://my.site.com/mydirectory.

When you do this, you'll get the AuthName from your httpd.conf file in the authentication window above the username and password fields, and the username and password should work, without having to have my.site.com\ prepended to the username.

The theory is that Windows is trying mount this as a CIFS share rather than using WebDAV, and the port number in the URL forces it to be WebDAV, but your guess is as good as mine.
 
Comments:
I have the same problem, How can I fix it? Thanks
 
I tried this and for some reason everything is recursively listed in the folder. I can create a new empty folder but when I enter it I see the same new folder. Try connecting like this "http://server/dav/#" I don't know why you need the /# but it works.
 
Looks like sending the Header
"MS-Author-Via" with a value of DAV helps windows notice that it's talking to dav. I did this with mod_headers in apache2
 
Thanks for the info about the number sign "#"! Helped a lot.

After some days of trying to get this to work I wrote a summary about the problem at http://ulihansen.kicks-ass.net/aero/webdav.
Listed six possible solutions on the client and the server-side. Additional ideas are welcome!

Ulrich Hansen (just another webadmin)
 
I had the same issues with apache 2.2.0, AuthType Digest, and Windows XP. After reading about many other people's woes, the simplest workaround was to create user accounts with '@' in the name, formatted like an e-mail address.

Create 'user@domain' or 'user@domain.tld' rather than just 'user'

This tricks XP into not sending 'hostname\username' during authentication. More info available at:

http://www.debian-administration.org/articles/279#comment_10
 
www.hss.caltech.edu/help/unix/admin/web/apache-webdav-xp
 
The fix is posted at the URL above, but the URL got truncated. It should be
..../admin/web/apache-webdav-xp
 
THANK YOU! Man, Windows XP is such a steaming pile. Thanks for the tip!
 
Beautiful: adding the :80 worked great for me. Merci Beaucoup!!
 
thank you thank you thank you!

-j
 
THANK YOUUU! After three days when I was fixing my app to pass the Litmus tests and passing the standard tests didn't solve the MSWin authentication... searching MSN didn't help... YOU HELPED ME!

Elixon
 
Life saver!

Can't believe how long I searched for this workaround. Well done!
 
Life saver!

Can't believe how long I searched for this workaround. Well done!
 
I had the same problem. For me, it turned out that I was trying to use DAV on a directory that was also a regular url.

Ex: I had /var/www/data available as a regularly accessible url. In httpd.conf I had aliased data to /var/www/data and turned dav on. Since /var/www was the doc root, /var/www/data could be served via regular http or DAV and this made XP confused. The solution ended up being to creat an alias for /var/www/data, say davdata and then turn dav on for the < Location /davdata >. This allows the webserver to then be clear about when to do DAV and when to do regular http (I think). Try it and see.
 
user@domain is really nice solution, ty
 
:80 worked for me!
fantastic.. thanks a lot, I'd be searching for ages for a solution. Stupid MS!
 
Thanks from JPL. I hate microsoft
 
Long time... Thank you very much! This worked for me
 
Thank you very much for the tip, it helped me resolve this issue on my computer and it has helped me rank well at my Job by being the only one knowing how to fix this! Thank you very much!

Best regards,
Gregory.
 
I am having a different problem. Apache is 2.2 and the access is by Windows XP Sp2 using SSL. The usersnames and passwords are in Mysql so I am using the libapache-auth-mod-mysql package. I can access the dav site but I have to authenticate three times before opening any folder. If I create a new folder, I have to authenticate three times. Thus, I see four entries in the log: user username not founf. On the fourth time, I am allowed into the folder.
 
after I added :80, still have a problem. 550 error.
 
Your a life saver, thank you much. This has been baffling me for some time. To make matters worse I don't have access to logs on my Apache server!
 
adding the port number to the URL solved it for med. Thanks!
 
Post a Comment



Links to this post:

Create a Link



<< Home
Various ramblings from Peter Clark about life, coding, parenthood, Java, grad school, and enjoying my mac book air

Name: Peter Clark

Terror Alert Level

Thao and the Get Down Stay Down -- When We Swam

Archives
09/01/2003 - 10/01/2003 / 10/01/2003 - 11/01/2003 / 11/01/2003 - 12/01/2003 / 12/01/2003 - 01/01/2004 / 01/01/2004 - 02/01/2004 / 02/01/2004 - 03/01/2004 / 03/01/2004 - 04/01/2004 / 04/01/2004 - 05/01/2004 / 05/01/2004 - 06/01/2004 / 06/01/2004 - 07/01/2004 / 07/01/2004 - 08/01/2004 / 08/01/2004 - 09/01/2004 / 09/01/2004 - 10/01/2004 / 10/01/2004 - 11/01/2004 / 11/01/2004 - 12/01/2004 / 12/01/2004 - 01/01/2005 / 01/01/2005 - 02/01/2005 / 02/01/2005 - 03/01/2005 / 03/01/2005 - 04/01/2005 / 04/01/2005 - 05/01/2005 / 05/01/2005 - 06/01/2005 / 06/01/2005 - 07/01/2005 / 07/01/2005 - 08/01/2005 / 08/01/2005 - 09/01/2005 / 09/01/2005 - 10/01/2005 / 10/01/2005 - 11/01/2005 / 11/01/2005 - 12/01/2005 / 12/01/2005 - 01/01/2006 / 01/01/2006 - 02/01/2006 / 02/01/2006 - 03/01/2006 / 03/01/2006 - 04/01/2006 / 04/01/2006 - 05/01/2006 / 05/01/2006 - 06/01/2006 / 06/01/2006 - 07/01/2006 / 09/01/2006 - 10/01/2006 / 10/01/2006 - 11/01/2006 / 11/01/2006 - 12/01/2006 / 12/01/2006 - 01/01/2007 / 01/01/2007 - 02/01/2007 / 02/01/2007 - 03/01/2007 / 03/01/2007 - 04/01/2007 / 04/01/2007 - 05/01/2007 / 05/01/2007 - 06/01/2007 / 06/01/2007 - 07/01/2007 / 07/01/2007 - 08/01/2007 / 08/01/2007 - 09/01/2007 / 10/01/2007 - 11/01/2007 / 11/01/2007 - 12/01/2007 / 12/01/2007 - 01/01/2008 / 02/01/2008 - 03/01/2008 / 03/01/2008 - 04/01/2008 / 04/01/2008 - 05/01/2008 / 05/01/2008 - 06/01/2008 / 06/01/2008 - 07/01/2008 / 07/01/2008 - 08/01/2008 / 09/01/2008 - 10/01/2008 / 10/01/2008 - 11/01/2008 / 11/01/2008 - 12/01/2008 / 12/01/2008 - 01/01/2009 / 01/01/2009 - 02/01/2009 / 02/01/2009 - 03/01/2009 / 03/01/2009 - 04/01/2009 / 04/01/2009 - 05/01/2009 / 05/01/2009 - 06/01/2009 / 06/01/2009 - 07/01/2009 / 07/01/2009 - 08/01/2009 / 08/01/2009 - 09/01/2009 / 10/01/2009 - 11/01/2009 / 11/01/2009 - 12/01/2009 / 12/01/2009 - 01/01/2010 / 03/01/2010 - 04/01/2010 /


Powered by Blogger

Subscribe to
Posts [Atom]