GNOME Bugzilla – Bug 551339
copying a folder from a webdav server to disk results in a html file
Last modified: 2012-06-13 11:07:41 UTC
the bug has been opened on https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/267642 "Intention: To copy a folder (empty or containing files) from a Secure Webdav server to any location (local, or on the dav server) Result: A fully formatted html file with the same filename as the folder I was trying to copy. It contains hierarchical links to the files contained within the original folder (if any). This is repeatable every time. An example of one such html file for the empty folder "Folder" is attached. I am running a fully updated Intrepid . kernel: 2.6.27-2-generic gvfs 0.99.6-0ubuntu3 nautilus 1:2.23.91-0ubuntu1 I'm not sure what other information to provide. I'll help in any way I can. http://launchpadlibrarian.net/17369352/Folder * Folder (748 bytes, text/html)"
the issue is a gvfs one
Sigh, yep, indeed. The way that gio's copy logic work, we need to return EISDIR for any open()s we get if the traget is a webdav collection. This means we neeed to stat (), i.e. do a PROPFIND, before doing the GET. Before every GET in webdav, yes. Teh Suck, indeed. Also this is a gvfs bug.
Nah, not fixed, damn bugzilla.
My fault, I'll fix it.
It seems, gvfs performs incorrect requests on copy. Instead of sending a COPY request to the server, it tries to GET the source and PUT it to the destination. This might be a working tactic for non-collection resources, but not for collections. However, in both cases the COPY request should be used, to reduce network traffic. I scanned the requests via Wireshark against Lighttpd mod_webdav and my own WebDAV implementation (http://ezcomponents.org/s/Webdav) with my current Gentoo Nautilus (gvfs/0.2.5). The resulting requests by Nautilus were the same.
Any news about this issue? MOVE is also affected, by the way. It creates a file with the name of the source collection, but then it gives me an error saying "Folder is not empty". This error doesn't show on COPY. And now a question: Why does it do so many duplicate PROPFINDs before issuing GET/PUT (which must be COPY/MOVE anyway)? Thank you. Best regards, Volker
Created attachment 131611 [details] Log of a single COPY transaction
-> webdav backend
I am affected by the exactly the same bug. A workaround seems to be using gnome-commander and then the Remote Server option in the connections menu, although the connection seems to be somewhat unreliable sometimes. Would really like to have this fixed in Nautilus though, any news? Kind regards, Pepijn
I'm implementing a DAV server and have encountered the same problem. The connection is regular HTTP using digest authentication. Downloading single files works properly, downloading folders does not. Using Ubuntu 9.10 gvfs-1.4.1-0ubuntu1
Bug #546216 is a dupe of this.
Bug #583952 is a dupe of this.
*** Bug 546216 has been marked as a duplicate of this bug. ***
*** Bug 583952 has been marked as a duplicate of this bug. ***
It has been over a year. Isn't it time this bug got fixed? Everytime I use our company's WebDAV shared Internet folder, I have to have the content put in a .zip file before I can download it. This problem is still present on Ubuntu 9.10 release. We use Linux, Mac, and Windows. It is always an embarrashment that Linux is the only one that can't do this simple access -- for over 15 months!
Ubuntu 10.04 fresh install still has this issue. Can we please fix this?
Not sure if 'we' can. But if you can, feel free to send a patch.
*** Bug 615255 has been marked as a duplicate of this bug. ***
*** Bug 611570 has been marked as a duplicate of this bug. ***
"We" are fixing this bug currently. The git branch on 'dav_sync_io' gitorious[1] has a first version of a fix. I tested it locally and it seems to work fine. I encourage everybody to give it a shot and report the results here. Since it is quite some complex threading stuff I would want a proper review from someone before I will commit it. It also needs some cleanup. [1]http://gitorious.org/lanedo/gvfs/commits/dav_sync_io
Has anyone tested this fix? I tried but I could not figure out how to test it.
For those who are running ubuntu: I made, with the help of seb128, a PPA with the fix in it: https://launchpad.net/~gicmo/+archive/packagedump
Christian, thanks for the package installation. I was able to install the newer version and had success and failure. I was able to copy a folder for the first time! A small folder with a few subfolders and files worked perfectly. A larger folder failed. At first it appeared that the failures were only on certain file names, but then simple file names also started failing. Eventualy the WebDav connection itself became unstable. The first error was: "There was an error reading the folder "JJ&A". HTTP Error: Resource Not Found." Additional file name errors before I chose "Skip All": "ResSys_Planning.pics", "The Solar System.graffle", "Eiko's Ring.graffel", "Templates", "ICONS". Trying to open the desktop icon for WebDav after the above copy completed yielded: "Error: HTTP Error: Connection terminated unexpectedly. Please select another viewer and try again." A second attempt to open the WebDav icon yielded: "File is of an unknown type." After that I unmounted the WebDav (successfully). To be explict on the installation, I used the archive source from Comment 22 and upgraded "gvsfs", "gvsfs-backends", "gvsfs-bin", "gvsfs-fuse" and manually chose "libgvfscommon0". All upgraded to 1.6.3+git20100817-oubuntu2 from 1.6.1-9ubuntu1build1.
Could you gather some debug info from the daemon by doing: export GVFS_HTTP_DEBUG="header" /usr/lib/gvfs/gvfsd --replace (Do before you have started the first DAV connection, otherwise it won't be picked up) You should see the the communication between the gvfs dav daemon and the server. If you could attach that here that would be superb. (Maybe remove the auth-haeader, just to be sure not confidential info is in there).
Created attachment 168315 [details] Requested log data
Christian, any progress on this issue?
*** Bug 605619 has been marked as a duplicate of this bug. ***
Same issue here with Ubuntu 10.10
Same issue here with Ubuntu 11.04. gvfs 1.8.0-0ubuntu2
I recently rebuilt one of our WebDAV's on our server because the website had become corrupted. Creating the site from scratch now allows the Linux client to copy folders. I also noticed with experimentation that for Linux to copy folders, the following MIME type had to be set: ".*", "application/octet-stream". (The original website had that MIME type but still failed to copy folders, even before it became corrupted.)
No, sorry. The system that I tested on is the one that had the test package Christian created in this email chain above.
Created attachment 187138 [details] [review] Stat (do a propfind) before opening the file to check if it is a directory Instead of changing the way we do IO for read () I came up with a simpler fix now that will also do a stat (i.e. a PROPFIND) before every open () to see if a file is a directory or not. I tested this locally and it worked fine. I will test this later at home and if no problems appear commit it to git. Sorry that it took so long.
That would be great! Thank you. We just had a big update to WebDAV on our systems, so getting this folder copying to work now would be perfect timing. I look forward to the update.
I have committed a version of the patch that fixed a small issue to git master (d3fcf41ef3).
*** Bug 634038 has been marked as a duplicate of this bug. ***
Cherry-picked it to gnome-3-0 branch so it will be in the nex stable release of GNOME (3.0.2).
Christian, I notice that Ubuntu 11.04 still has this bug.
*** Bug 664458 has been marked as a duplicate of this bug. ***