Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#23 WebDAV mount Read Only

closed
nobody
None
5
2006-07-23
2006-03-15
Gavin Young
No

I have successfully installed DAVFS2 (v0.2.8) onto our
CentOS 4.2 server and I can mount a WebDAV share but
after mounting I am unable to write files to it.

/etc/fstab
http://servername/servlet/webdav.documents
/file_drives/webdav davfs user,noauto 0 0

When I try to copy a file onto the mount point:
# cp /root/example.log /file_drives/webdav

I get this error message:
cp: cannot create regular file
`/file_drives/atane_webdav/example.log':
Input/output error

Any help would be greatly appreciated.

Gavin

Discussion

  • Werner Baumann
    Werner Baumann
    2006-03-16

    Logged In: YES
    user_id=1260327

    Hello Gavin,

    does the server allow writing?
    You may have a look at the log files of the server. There
    should be logged the requests from davfs2 together with the
    error code of the response.
    You may also look at the log files of the client whether
    there are any entries from mount.davfs, coda or neon.

    Greetings
    Werner

     
  • Gavin Young
    Gavin Young
    2006-03-16

    Logged In: YES
    user_id=737269

    The WebDAV share was being provided through Tomcat and when
    we checked the Tomcat logs on the server I found errors like:
    DATE StandardContext[/servlet]documents: LOCK: /example.log

    After adding "nolocks" to the mounting options within
    /etc/fstab everything works correctly.

    Final /etc/fstab line looks like this:
    http://servername/servlet/webdav.documents
    /file_drives/webdav davfs user,noauto,nolocks 0 0

    Thanks for the quick reply!

    Gavin

     
  • Gavin Young
    Gavin Young
    2006-03-16

    Logged In: YES
    user_id=737269

    When trying to sync between the mounted WebDAV dir and a
    local dir using unison we are receiving errors such as this:
    DATE StandardContext[/servlet]documents: Filename: .#Mail
    shot incl env.doc.22632b9285219a0ff0e9e76ee7cab0ac.unison.tmp
    DATE StandardContext[/servlet]documents: Mime:
    application/octet-stream
    DATE StandardContext[/servlet]documents: Overwrite true not
    supported in MOVE request.
    DATE StandardContext[/servlet]documents: Overwrite true not
    supported in MOVE request.

    It looks like unison creates a tmp file and then uses the mv
    command to reneame. Do you know of any solution to the above
    error messages?

     
  • Werner Baumann
    Werner Baumann
    2006-03-17

    Logged In: YES
    user_id=1260327

    Hello Gavin,

    one remark about Tomcat:
    If you can configure Tomcat to allow locks, this would be
    the better solution. If you don't use locks, one user might
    overwrite the changes of another user.

    Unison:
    I am not familiar with unison (I don't even know what it
    is). So I assume: Unison is an application, running on your
    client and accesing the mounted davfs2 file system.
    Some application (e.g. gedit and propably unison) indeed
    create a temporary copy of the file to edit. They edit that
    copy and when finished they do a 'mv temp-copy original'.
    That is okay. davfs2 now uses the HTTP MOVE-method to
    replace the original on the server by the temporal copy
    (that is on the server too). Some servers don't
    allow/support this.

    I am sorry to tell that I see no quick solution for davfs2
    to overcome this problem. It would be possible, but it would
    be quite a lot of work to do.

    I am working on a new version of davfs2 (and therefore have
    not much time for big changes in the old version) and I
    think I found an (at least partial) solution for this: I
    hold this temporal copies local and when finished upload
    them to the server with the PUT method. It works with gedit.

    If you are intersted to try this solution, you will find the
    source code in our CVS repository, branch
    'select-coda-version'. But it is beta-code (at best, maybe
    still alpha, I don't know) and not ready for production use,
    testing only. And still worse: documentation is imcomplete
    and partially outdated.

    Greetings
    Werner

    P.S.: Maybe there is a chance to have a look at the server
    configuration and enable 'MOVE with overwrite' (would be the
    best solution at the moment).

     
  • Werner Baumann
    Werner Baumann
    2006-07-23

    • status: open --> closed