Bug#273476: mod_dav: if move fails for some reason, both source and destination files gets deleted
Package: apache2-common
Version: 2.0.51-2
Severity: critical
Justification: causes serious data loss
Configuration: apache2 + mod_dav + share like:
webdav share =
/ -> /mnt
/disk1 -> /mnt/disc1
/disk2 -> /mnt/disc2
and I was moving /disk2/dir/ with /disk2/dir2/file{1,2} to /disk1/
Client: MacOSX Finder
Moving a directory (dir) two 700MB files (file1,2) from disk2 to disk1
gave me an unknown error and now there's only the dir and one file
(file2) in disk1. disk2 still contains "dir", but is now empty. the
second file (file1) was compeletely trashed.
When moving files inside the same disk, I haven't had any problem so
far. It seems to happen only when it's moving between different disks,
thus webdav is copy+unlinking.
In apache2/error.log, I have:
[Sun Sep 26 13:31:34 2004] [error] [client 192.168.3.2] (2)No such file
or directory: Could not remove source file after move. Destination was
removed to ensure consistency. [500, #0]
Nothing touched the source files, so it has to be mod_dav itself getting
confused.
Anyway, besides knowing what was really the problem, I think apache
mod_dav should NOT remove the destination file "to ensure consistency".
Can we remove that code or ask upstream ? What do you think ? I think
I'll try to patch it myself just after I'm able to get my file back...
thanks
PS: feel free to downgrade the severity. A bug in web_dav that makes it
completely unusable should not affect the rest of the apache2 package.
But I'd like to keep this documented in the bugtracking as a "be very
careful with mod_dav".
-- System Information:
Debian Release: 3.1
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.7-litux-1
Locale: LANG=C, LC_CTYPE=C
Versions of packages apache2-common depends on:
ii debconf 1.4.36 Debian configuration management sy
ii debianutils 2.9 Miscellaneous utilities specific t
ii libapr0 2.0.51-2 The Apache Portable Runtime
ii libc6 2.3.2.ds1-16 GNU C Library: Shared libraries an
ii libdb4.2 4.2.52-17 Berkeley v4.2 Database Libraries [
ii libexpat1 1.95.6-8 XML parsing C library - runtime li
ii libldap2 2.1.30-3 OpenLDAP libraries
ii libmagic1 4.10-3 File type determination library us
ii libssl0.9.7 0.9.7d-5 SSL shared libraries
ii mime-support 3.28-1 MIME files 'mime.types' & 'mailcap
ii net-tools 1.60-10 The NET-3 networking toolkit
ii openssl 0.9.7d-5 Secure Socket Layer (SSL) binary a
ii ssl-cert 1.0-10 Simple debconf wrapper for openssl
ii zlib1g 1:1.2.1.2-1 compression library - runtime
-- no debconf information
Reply to: