Webdav problem

Discussion in 'General' started by lano, Mar 27, 2009.

  1. lano

    lano New Member

    I'm trying to get webdav working in 2.2.30, but no luck.
    Reseller have webdav enabled, do does site and user.

    Vhosts_ispconfig.conf automaticly added following lines:

    Code:
    <IfModule mod_dav.c>
           Alias /webdav /var/www/web12/web
            <Location /webdav>
               DAV On
               AuthType Basic
               AuthName "webdav"
               AuthUserFile /var/www/web12/passwd.dav
               Require valid-user
           </Location>
    </IfModule>
    
    in /var/www/web12 passwd.dav exists.

    dav and dav_fs is enabled.
    When I try to connect to http://www.mydomain.tld:80/webdav I'm required to enter username/pass, but then I get error
    Code:
     The folder you entered does not appear to be valid. Please choose another.
    
    Client is WinXP

    Any idea?
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Any errors in the web site's error log?
    Did you enable WebDAV for the user, and do you use the correct username and password?
     
  3. lano

    lano New Member

    Error log of my website throws this:

    Code:
    [Sat Mar 28 19:18:41 2009] [error] [client my.ip.here] File does not exist: /var/www/web12/web/error/authorizationRequired.html
    [Sat Mar 28 19:18:48 2009] [error] [client my.ip.here] (13)Permission denied: Could not open password file: /var/www/web12/passwd.dav
    [Sat Mar 28 19:18:48 2009] [error] [client my.ip.here] File does not exist: /var/www/web12/web/error/internalServerError.html
    [Sat Mar 28 19:18:48 2009] [error] [client my.ip.here] (13)Permission denied: Could not open password file: /var/www/web12/passwd.dav
    [Sat Mar 28 19:18:48 2009] [error] [client my.ip.here] File does not exist: /var/www/web12/web/error/internalServerError.html
    [Sat Mar 28 19:18:48 2009] [error] [client my.ip.here] (13)Permission denied: Could not open password file: /var/www/web12/passwd.dav
    [Sat Mar 28 19:18:48 2009] [error] [client my.ip.here] File does not exist: /var/www/web12/web/error/internalServerError.html
    [Sat Mar 28 19:18:48 2009] [error] [client my.ip.here] File does not exist: /var/www/web12/web/_vti_inf.html
    [Sat Mar 28 19:18:48 2009] [error] [client my.ip.here] File does not exist: /var/www/web12/web/error/fileNotFound.html
    [Sat Mar 28 19:18:48 2009] [error] [client my.ip.here] File does not exist: /var/www/web12/web/_vti_bin
    [Sat Mar 28 19:18:48 2009] [error] [client my.ip.here] File does not exist: /var/www/web12/web/error/fileNotFound.html
    [Sat Mar 28 19:18:48 2009] [error] [client my.ip.here] (13)Permission denied: Could not open password file: /var/www/web12/passwd.dav
    [Sat Mar 28 19:18:48 2009] [error] [client my.ip.here] File does not exist: /var/www/web12/web/error/internalServerError.html
    
    Note, that I manualy changed my IP in this post.

    I noticed, that passwd.dav was 640. I changed permission to 644, and logon to webdav folders went sucesfull.
    However, I also noticed, that I can copy files only to folders with 777.

    David
     
  4. lano

    lano New Member

    As you might read above, webdav didnt work for me at first place, so I fixed problem by changing permission passwd.dav to 664.
    Then, I also remembered, that some users would like to have webdav folder seperate from web folder (hide web files from the others) and enabled to users to see it.
    Here is the solution that worked for me.
    My website is /var/www/web12 and webdav folder is /var/www/web12/web/share

    First we check, that "WebDAV" is disabled for your site.

    Then we create "share" folder (or whatever you want to name it, but dont forget to change alias) and change permission to 777
    In the apache directives (vhosts) we put:
    Code:
    <IfModule mod_dav.c>
           Alias /webdav /var/www/web12/web/share
            <Location /webdav>
               DAV On
               AuthType Basic
               AuthName "Members Only"
               AuthUserFile /var/www/web12/.htpasswd
               Require valid-user
           </Location>
    </IfModule>
    
    Change web12 to whatever it suites you.

    Save and it should work.
    You can conect it just the same, to http://www.yourdomain.tld:80/webdav if you are using Windows machine.

    David
     
  5. falko

    falko Super Moderator ISPConfig Developer

    Can you check /etc/group if your Apache user is a member of the group web12? If it is, you shouldn't need all those permission changes.
     
  6. lano

    lano New Member

    Code:
    cat /etc/group
    ...
    web12:x:10012:admispconfig,myusername
    ...
    
    All groups have only adminispconfig and administrator username of the specific website.

    Should there be also www-data user at every website (web**)?
     
  7. falko

    falko Super Moderator ISPConfig Developer

    Yes, for every web site that has WebDAV enabled.

    Which distribution are you using?
     
  8. lano

    lano New Member

    I checked.
    When I enable WebDAV, there are users adminispconfig, siteuser and root (not www-data).
    Distro is Etch, perfect setup, perfect working (except webdav glitch:))
     
  9. falko

    falko Super Moderator ISPConfig Developer

    Can you post the output of
    Code:
    ls -la /etc/apache2
    ?
     
  10. lano

    lano New Member

    Code:
    vratar:~# ls -la /etc/apache2
    total 140
    drwxr-xr-x  8 root root  4096 2008-05-19 22:43 .
    drwxr-xr-x 92 root root 12288 2009-03-30 21:59 ..
    -rw-r--r--  1 root root 25540 2009-03-30 21:59 apache2.conf
    -rw-r--r--  1 root root 25496 2007-07-30 10:37 apache2.conf.30-07-07_10-37-50
    -rw-r--r--  1 root root 24175 2007-07-30 10:37 apache2.conf.orig
    drwxr-xr-x  2 root root  4096 2008-05-19 22:43 conf.d
    -rw-r--r--  1 root root   895 2007-03-27 14:58 envvars
    -rw-r--r--  1 root root     0 2007-07-30 09:53 httpd.conf
    drwxr-xr-x  2 root root 12288 2008-05-19 22:43 mods-available
    drwxr-xr-x  2 root root  4096 2009-03-26 21:10 mods-enabled
    -rw-r--r--  1 root root    21 2007-07-30 10:37 ports.conf
    -rw-r--r--  1 root root    21 2007-07-30 10:37 ports.conf.30-07-07_10-37-50
    drwxr-xr-x  2 root root  4096 2008-05-19 22:43 sites-available
    drwxr-xr-x  2 root root  4096 2007-07-30 09:53 sites-enabled
    drwxr-xr-x  2 root root  4096 2009-03-28 21:56 vhosts
    vratar:~#
    
     
  11. falko

    falko Super Moderator ISPConfig Developer

    What's in /etc/apache2/envvars?
     
  12. lano

    lano New Member

    Sorry for the late reply.

    In /etc/apache2/envvars is everything commented.
    But as I see, that was a bug fixed in the 2.2.31 version

    I will try to upgrade later today.
    Thanks
     
  13. lano

    lano New Member

    I just upgraded to 2.2.31 and webdav now works as it should.

    Thanks
     

Share This Page