davfs2 & unzip / gunzip / tar troubles

  • HeCSa

    HeCSa - 2007-11-02

    I'm using webdav to share some directories with some servers, and I'm
    having some problems with the unzip command, when used inside one of the
    mounted webdav filesystems.
    My Apache2 server's name is "webserver", and one of the client systems is
    The exported directory is /u03/davshare/shared, and is mounted on
    The exporting user, owner of the /u03/davshare/shared directory (not all
    the path, only the shared dir) is "apache", and the uid used to mount the
    filesystem is "oracle".
    The filesystem works fine, but when trying to unzip some file, I receive
    this kind of output:

    [oracle@dbserver01 shared]$ unzip plano.zip
    Archive:  plano.zip
      inflating: plano
    plano:  write error (disk full?).  Continue? (y/n/^C) y
    bad CRC 70c87f1c  (should be 7ffe3e18)
    [oracle@dbserver01 shared]$ ls -las
    total 1082
       1 drwxr-xr-x  3 oracle oinstall     184 Oct 30 20:57 .
       1 drwx------  2 oracle oinstall      64 Oct 30 20:38 lost+found
       0 -rw-r--r--  1 oracle oinstall       0 Oct 24 10:42 plano
    1081 -rw-r--r--  1 oracle oinstall 1106400 Oct 30 20:40 plano.zip

    As you can see, the file is created, but the size is "0".

    On the apache2 server, the error_log file shows something like this:

    [Tue Oct 30 20:57:24 2007] [error] [client] File does not
    exist: /u03/davshare/shared/plano
    [Tue Oct 30 20:57:34 2007] [error] [client] File does not
    exist: /u03/davshare/shared/plano

    Any idea on where to start? I've looking for some info, I've googled, but
    nothing :-(

      The OS I'm using is Red Hat AS 4 Update 5.
       The packages used to mount the davfs2 shares are these:

    [root@dbserver01 ~]# rpm -qa | grep fuse
    [root@dbserver01 ~]#

       The /etc/fstab is configured in this way:

    http://webserver/shared     /mnt/shared    davfs  uid=oracle,gid=oinstall,dir_mode=770     0 0

       The /etc/davfs2/davfs2.conf contents (all but commented) are these:

    dav_user        oracle
    dav_group       dba

       I was looking for the debug option on the davfs2.conf man page, but I
    didn't found anything. How do I enable it?

    Thanks a lot in advance for your answer!!!

    • Werner Baumann

      Werner Baumann - 2007-11-02

      In many cases problems like this are caused by server bugs concerning locking (e.g. SVN has a bug like this). So you might try option "use_locks 0" in your davfs2.conf. But this is just a guess; it may work or not.

      I would be better to track down the problem. First step would be to look what requests are sent from davfs2 and what is the server's response. Unfortunately the debug-option in davfs2.conf was only introduced with davfs2-1.2.2. But there are alternatives:

      Most easy:
      Please send me the entries from the server's *access*.log.

      Not so easy:
      - Log the Http-traffic using tcpdump or wireshark.
      - Remove the davfs2-package from Red Hat and install davfs2-1.2.2 from the source-package on this site and use the debug-option in davfs2.conf.


    • HeCSa

      HeCSa - 2007-11-02

         Thank you for your answer.
         The data you asked for is what follows:

      1) Output from the web server (Apache 2.0.54, /var/log/httpd/access_log):
      a) When copying a file, with destination name "plano": - - [02/Nov/2007:14:24:48 -0300] "PROPFIND /shared/ HTTP/1.1" 207 7789 "-" "davfs2/1.2.1 neon/0.24.7" - - [02/Nov/2007:14:24:48 -0300] "PROPFIND /shared/ HTTP/1.1" 207 28822 "-" "davfs2/1.2.1 neon/0.24.7" - - [02/Nov/2007:14:24:48 -0300] "HEAD /shared/plano HTTP/1.1" 404 - "-" "davfs2/1.2.1 neon/0.24.7" - - [02/Nov/2007:14:24:48 -0300] "LOCK /shared/plano HTTP/1.1" 200 420 "-" "davfs2/1.2.1 neon/0.24.7" - - [02/Nov/2007:14:24:58 -0300] "HEAD /shared/plano HTTP/1.1" 404 - "-" "davfs2/1.2.1 neon/0.24.7" - - [02/Nov/2007:14:24:58 -0300] "PUT /shared/plano HTTP/1.1" 201 316 "-" "davfs2/1.2.1 neon/0.24.7" - - [02/Nov/2007:14:24:58 -0300] "PROPPATCH /shared/plano HTTP/1.1" 207 340 "-" "davfs2/1.2.1 neon/0.24.7" - - [02/Nov/2007:14:24:58 -0300] "HEAD /shared/plano HTTP/1.1" 200 - "-" "davfs2/1.2.1 neon/0.24.7" - - [02/Nov/2007:14:24:58 -0300] "UNLOCK /shared/plano HTTP/1.1" 204 - "-" "davfs2/1.2.1 neon/0.24.7"

      b) When zipping the "plano" file to "plano.zip": - - [02/Nov/2007:14:25:21 -0300] "HEAD /shared/plano.zip HTTP/1.1" 404 - "-" "davfs2/1.2.1 neon/0.24.7" - - [02/Nov/2007:14:25:21 -0300] "LOCK /shared/plano.zip HTTP/1.1" 200 420 "-" "davfs2/1.2.1 neon/0.24.7" - - [02/Nov/2007:14:25:21 -0300] "UNLOCK /shared/plano.zip HTTP/1.1" 204 - "-" "davfs2/1.2.1 neon/0.24.7" - - [02/Nov/2007:14:25:21 -0300] "HEAD /shared/zio3axSD HTTP/1.1" 404 - "-" "davfs2/1.2.1 neon/0.24.7" - - [02/Nov/2007:14:25:21 -0300] "LOCK /shared/zio3axSD HTTP/1.1" 200 420 "-" "davfs2/1.2.1 neon/0.24.7" - - [02/Nov/2007:14:25:21 -0300] "GET /shared/plano HTTP/1.1" 304 - "-" "davfs2/1.2.1 neon/0.24.7" - - [02/Nov/2007:14:25:21 -0300] "UNLOCK /shared/zio3axSD HTTP/1.1" 204 - "-" "davfs2/1.2.1 neon/0.24.7" - - [02/Nov/2007:14:25:21 -0300] "LOCK /shared/plano.zip HTTP/1.1" 200 420 "-" "davfs2/1.2.1 neon/0.24.7" - - [02/Nov/2007:14:25:29 -0300] "HEAD /shared/plano.zip HTTP/1.1" 404 - "-" "davfs2/1.2.1 neon/0.24.7" - - [02/Nov/2007:14:25:29 -0300] "PUT /shared/plano.zip HTTP/1.1" 201 316 "-" "davfs2/1.2.1 neon/0.24.7" - - [02/Nov/2007:14:25:29 -0300] "HEAD /shared/plano.zip HTTP/1.1" 200 - "-" "davfs2/1.2.1 neon/0.24.7" - - [02/Nov/2007:14:25:29 -0300] "UNLOCK /shared/plano.zip HTTP/1.1" 204 - "-" "davfs2/1.2.1 neon/0.24.7"

      c) When trying to unzip the file, **WITH THE ERRORS**: - - [02/Nov/2007:14:26:05 -0300] "PROPFIND /shared/ HTTP/1.1" 207 7789 "-" "davfs2/1.2.1 neon/0.24.7" - - [02/Nov/2007:14:26:05 -0300] "PROPFIND /shared/ HTTP/1.1" 207 30118 "-" "davfs2/1.2.1 neon/0.24.7" - - [02/Nov/2007:14:26:09 -0300] "DELETE /shared/plano HTTP/1.1" 204 - "-" "davfs2/1.2.1 neon/0.24.7" - - [02/Nov/2007:14:26:09 -0300] "HEAD /shared/plano HTTP/1.1" 404 - "-" "davfs2/1.2.1 neon/0.24.7" - - [02/Nov/2007:14:26:09 -0300] "LOCK /shared/plano HTTP/1.1" 200 420 "-" "davfs2/1.2.1 neon/0.24.7" - - [02/Nov/2007:14:26:31 -0300] "HEAD /shared/plano HTTP/1.1" 404 - "-" "davfs2/1.2.1 neon/0.24.7" - - [02/Nov/2007:14:26:31 -0300] "PUT /shared/plano HTTP/1.1" 201 316 "-" "davfs2/1.2.1 neon/0.24.7" - - [02/Nov/2007:14:26:31 -0300] "PROPPATCH /shared/plano HTTP/1.1" 207 340 "-" "davfs2/1.2.1 neon/0.24.7" - - [02/Nov/2007:14:26:31 -0300] "HEAD /shared/plano HTTP/1.1" 200 - "-" "davfs2/1.2.1 neon/0.24.7" - - [02/Nov/2007:14:26:31 -0300] "UNLOCK /shared/plano HTTP/1.1" 204 - "-" "davfs2/1.2.1 neon/0.24.7"

         I've tried to put the "use_lock 0", but happens the same.
         Next, I'll try to upgrade the davfs2 binaries...but do you have any idea with the data I'm sending to you?
         Thanks a lot again,


    • Werner Baumann

      Werner Baumann - 2007-11-02

      What looks wrong in case c:

      There should be a GET-request for /shared/plano.zip before the DELETE. It is very unlikely that davfs2 has forgotten about it. More likely Apache has eaten it up. Probably there is a matching entry in error.log (unfortunately your error.log and access.log are from different requests).

      One very probable reason for this is Content-Negotiation. Most Apache installations have it turned on by default. When WebDAV is used, this is asking for trouble. With content negotiation Apache treats files with different extensions but same prefix (like plano and plano.zip, or files with extensions that look like language codes) as variants of the same resource and associates them with the same URL. When a WebDAV-client tries to access this files separately, Apache usually mixes them up and then goes banana.

      When I enable content negotiation on Apache, unzip does not work too, but with slightly different details (it works when content negotiation is off).

      Please have a look at your Apache configuration and disable content negotiation. You will have to disable Option Multiviews in your WebDAV-directories. Additionally you might add option "kernel_fs fuse" in davfs2.conf. Your version of davfs2 probably uses the coda kernel file system by default. But fuse seems to work more reliably, especialy when files are added and deleted (coda sometimes reuses stale information from its internal cache).

      If this does not help, we will need debug information from davfs2. Unfortunately I added the debug option only in version 1.2.2. But installing davfs2 from the sources is not much trouble (I hope so).


    • HeCSa

      HeCSa - 2007-11-03

      Well...I think I messed up the things ;-)
      I tried to install the 1.2.2 davfs2, starting with the configure-make-make install method, and I destroyed something. I think some libraries may be wrong.
      I'll start again with this server on monday (it was installed with a tftpboot-dhcpd-bootp method, so I have the image preaty clean, and it installs in less than 10 minutes...), and now I'll check the item you said, specially the content negotiation stuff.
      Thanks a lot for all your help. On monday, I'll start again with my tests.


    • Werner Baumann

      Werner Baumann - 2007-11-03

      I think, checking for Content-Negotiation should be the next step, before installing another version of davfs2 (it is the most likely reason for the problem).

      Some hints concerning installation of davfs2-1.2.2:

      - you should remove the davfs2-1.2.1 package first. As the davfs2-binary (or a link to it) must be in /sbin (demanded by the mount program) different versions of davfs2 can not coexist on a system (at least you would have to manually edit /sbin).

      - be sure, not to remove the neon-library. davfs2 should use the neon library that comes with your distribution (versions 0.24 to 0.26 are supported). It is possible to install another neon-library, but that might introduce new problems.

      - After running the configure script, check for the neon library it will use. The configure script will print a summary that shows the neon-library it will use. If it does not find the systems neon-library, you may want to use an option like "./configure --with-neon=/usr".

      - davfs2 by default will install in /usr/local, as it is not part of the distribution. But it will add symbolic links in /sbin (mount.davfs and umount.davfs). The system wide configuration files will be in /usr/local/etc/davfs2.


      • HeCSa

        HeCSa - 2007-11-09

        Today I'll try this on two virtual machines, because the production ones now have an application inside...if I break the libraries again, I'll have big troubles with my boss.
        I'll tell you the results.
        Thanks again!!!



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks