# WebDAV Help [solved]

## lroy1978

Hello

I am trying to get webDAV working but I don't seem to be having much luck. When I use the 'Add Network Place Wizard' in Windows, I get to see the authentication to connect to the webDAV server - but I cannot connect!

I have been following :

http://gentoo-wiki.com/HOWTO_WebDav

Here is a copy of my 45_mod_dav.conf file

```

<IfDefine DAV>

  <IfModule !mod_dav.c>

    LoadModule dav_module    modules/mod_dav.so

  </IfModule>

</IfDefine>

<IfDefine DAV_FS>

  <IfModule !mod_dav_fs.c>

    LoadModule dav_fs_module   modules/mod_dav_fs.so

  </IfModule>

</IfDefine>

<IfModule mod_dav.c>

    Alias /mydavserver /var/dav/mydavserver

    DavMinTimeout 600

        <Directory /mydavserver>

                Options None

                Dav On

                <Limit GET PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>

                        AuthType Basic

                        AuthName "WebDAV authentication"

                        AuthUserFile /var/dav/.davpasswd

                        Require lee

                </Limit>

                AllowOverride None

                Order allow,deny

                Allow from all

        </Directory>

</IfModule>

<IfModule mod_dav_fs.c>

    # Location of the WebDAV lock database.

    DavLockDB /var/lib/dav/lockdb

</IfModule>

```

And here is a copy of my /etc/conf.d/apache2 options config

```

APACHE2_OPTS="-D DEFAULT_VHOST -D DAV -D DAV_FS -D PHP5 -D INFO -D LANGUAGE -D SSL -D SSL_DEFAULT_VHOST -D SUEXEC"

```

I have tried recreating the password file but that does not work either.

Any suggestions?

Cheers,

LeeLast edited by lroy1978 on Tue Jan 15, 2008 5:50 pm; edited 2 times in total

----------

## pteppic

Do you get anything in /var/log/apache2/error.log when you try to login?

Do you have IE7 on the Doze machine?

----------

## lroy1978

I get :

tail /var/log/apache2/error_log

[Fri Jan 11 23:26:13 2008] [error] [client 83.177.220.95] client denied by server configuration: /var/dav/mydavserver

[Fri Jan 11 23:26:20 2008] [error] [client 83.177.220.95] client denied by server configuration: /var/dav/mydavserver

[Fri Jan 11 23:26:20 2008] [error] [client 83.177.220.95] client denied by server configuration: /var/dav/mydavserver

[Fri Jan 11 23:26:20 2008] [error] [client 83.177.220.95] client denied by server configuration: /var/dav/mydavserver

[Fri Jan 11 23:26:23 2008] [error] [client 83.177.220.95] client denied by server configuration: /var/dav/mydavserver

[Fri Jan 11 23:26:23 2008] [error] [client 83.177.220.95] client denied by server configuration: /var/dav/mydavserver

[Fri Jan 11 23:26:23 2008] [error] [client 83.177.220.95] client denied by server configuration: /var/dav/mydavserver

[Fri Jan 11 23:26:25 2008] [error] [client 83.177.220.95] client denied by server configuration: /var/dav/mydavserver

[Fri Jan 11 23:26:25 2008] [error] [client 83.177.220.95] client denied by server configuration: /var/dav/mydavserver

[Fri Jan 11 23:26:25 2008] [error] [client 83.177.220.95] client denied by server configuration: /var/dav/mydavserver

I'm using IE6 on the Doze machine,

Lee

----------

## pteppic

Your <directory /mydavserver> directive should be a <location /mydavserver> directive.

And until it works change your require to valid-user. I believe it (finally) should be 'Require user lee'

EDIT:Also you can put 'Options +Indexes' in a line before 'Dav On' to get normal http listings of the dav filesystem structure, good for testing your authentication setup.

----------

## lroy1978

Thanks! I can now access the WebDAV directory! However, one problem remains!

I cannot open any files within the WebDAV directory, windows gives me an error message. "The filename, directory name, or volume label syntax is incorrect"

And the subdirectories are not visible.

Here is the contents of the Web DAV directory from my Gentoo box :

mydavserver # ls -l

total 1484

drwxr-xr-x 2 root   root      4096 jan 12 00:08 dir_test

lrwxrwxrwx 1 root   root        19 jan 10 18:59 music -> /mnt/hdd_usb/music/

-rw-r--r-- 1 apache apache      15 jan 11 21:00 test.txt

-rw-rw-rw- 1 apache apache 1506495 déc 22 15:02 usbdriver.zip

----------

## pteppic

Post your current config file pls. Also look at the error log again whilst trying to access a file.

----------

## lroy1978

```

<IfDefine DAV>

  <IfModule !mod_dav.c>

    LoadModule dav_module    modules/mod_dav.so

  </IfModule>

</IfDefine>

<IfDefine DAV_FS>

  <IfModule !mod_dav_fs.c>

    LoadModule dav_fs_module   modules/mod_dav_fs.so

  </IfModule>

</IfDefine>

<IfModule mod_dav.c>

    Alias /mydavserver /var/dav/mydavserver

    DavMinTimeout 600

        <Location /mydavserver>

                Options None

                Dav On

                <Limit GET PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>

                        AuthType Basic

                        AuthName "WebDAV authentication"

                        AuthUserFile /var/dav/.davpasswd

                        Require valid-user

                </Limit>

                AllowOverride None

                Order allow,deny

                Allow from all

        </Location>

</IfModule>

<IfModule mod_dav_fs.c>

    # Location of the WebDAV lock database.

    DavLockDB /var/lib/dav/lockdb

</IfModule>

```

When trying to access the files it is not adding any errors to /var/log/apache2/error_log

Here is my apache2 access_log file if thats any help

```

tail /var/log/apache2/access_log

83.177.220.95 - - [12/Jan/2008:12:31:47 +0100] "PROPFIND /mydavserver HTTP/1.1" 401 469

83.177.220.95 - lee [12/Jan/2008:12:31:52 +0100] "PROPFIND /mydavserver HTTP/1.1" 301 314

83.177.220.95 - lee [12/Jan/2008:12:31:52 +0100] "PROPFIND /mydavserver/ HTTP/1.1" 207 3368

83.177.220.95 - - [12/Jan/2008:12:31:54 +0100] "OPTIONS / HTTP/1.1" 200 -

83.177.220.95 - - [12/Jan/2008:12:31:54 +0100] "OPTIONS /mydavserver/dir_test HTTP/1.1" 301 323

83.177.220.95 - - [12/Jan/2008:12:31:54 +0100] "OPTIONS /mydavserver/dir_test/ HTTP/1.1" 200 -

83.177.220.95 - lee [12/Jan/2008:12:31:54 +0100] "PROPFIND /mydavserver/dir_test HTTP/1.1" 301 323

83.177.220.95 - lee [12/Jan/2008:12:31:54 +0100] "PROPFIND /mydavserver/dir_test/ HTTP/1.1" 207 964

83.177.220.95 - lee [12/Jan/2008:12:31:55 +0100] "PROPFIND /mydavserver HTTP/1.1" 301 314

83.177.220.95 - lee [12/Jan/2008:12:31:55 +0100] "PROPFIND /mydavserver/ HTTP/1.1" 207 3368

```

----------

## lroy1978

I tried copying a file to the directory and got the following :

```

tail /var/log/apache2/error_log

[Sat Jan 12 12:36:42 2008] [notice] Apache/2.2.6 (Unix) DAV/2 mod_ssl/2.2.6 OpenSSL/0.9.8g PHP/5.2.5-pl1-gentoo configured -- resuming normal operations

[Sat Jan 12 12:37:03 2008] [error] [client 83.177.220.95] access to /mydavserver/dir_test failed, reason: require directives present and no Authoritative handler.

[Sat Jan 12 12:37:08 2008] [error] [client 83.177.220.95] access to /mydavserver/dir_test failed, reason: require directives present and no Authoritative handler.

[Sat Jan 12 12:37:11 2008] [error] [client 83.177.220.95] access to /mydavserver/dir_test failed, reason: require directives present and no Authoritative handler.

[Sat Jan 12 12:37:29 2008] [notice] caught SIGTERM, shutting down

[Sat Jan 12 12:37:30 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)

[Sat Jan 12 12:37:32 2008] [notice] Apache/2.2.6 (Unix) DAV/2 mod_ssl/2.2.6 OpenSSL/0.9.8g PHP/5.2.5-pl1-gentoo configured -- resuming normal operations

[Sat Jan 12 12:38:39 2008] [error] [client 83.177.220.95] File does not exist: /var/dav/mydavserver/dir_test/subsilver_french.zip

[Sat Jan 12 12:38:39 2008] [error] [client 83.177.220.95] Unable to PUT new contents for /mydavserver/dir_test/subsilver_french.zip.  [403, #0]

[Sat Jan 12 12:38:39 2008] [error] [client 83.177.220.95] (13)Permission denied: An error occurred while opening a resource.  [500, #0]

```

----------

## pteppic

I have different <ifmodule ****> directives, does it work if you take them out? Just comment them and restart.

----------

## lroy1978

Same problem. Do you know of a publically accessible webDAV server that I could use to try and see if the problem comes from Window$ or my web DAV config?

Thanks,

Lee

----------

## lroy1978

The problem definately seems to be linked to Windows unfortunately. I tried with an open source web DAV client, and everything worked ok.

Thanks for all the help pteppic.

Lee

----------

