WebDAV creates 0 byte files
I am using Kolab 16 with Nginx and try to get WebDAV working.
Everything I did by now was uncommenting "fastcgi_param DAVBROWSER 1;" in the iRony section of the nginx configuration file. Once I did this, I was able to access iRony over the web interface and sucessfully uploaded files in my web browser to my shared folder.
Then I tried to connect to my WebDAV using ES File Explorer on my Android phone. I used the following settings:
and received a file tree. Then I started browsing all folders down:
files > Shared Folders > shared > MYSHAREDFOLDER
I tried to copy an image from my internal storage into this directory, but the created file had zero bytes. Afterwards I switched to my Ubuntu machine and tried to connect to it using Nautilus. Same result.
In my log files I found the following error messages:
[17-Aug-2017 02:19:00 Europe/Berlin] PHP Warning: Declaration of Kolab\CardDAV\Plugin::validateVCard(&$data) should be compatible with Sabre\CardDAV\Plugin::validateVCard(&$data, &$modified) in /usr/share/iRony/lib/Kolab/CardDAV/Plugin.php on line 0
[16-Aug-2017 04:29:33,993636 +0200]: <enn4sfgo> PHP Error: No kolab_storage_cache class found for folder 'Shared Folders' of type '' (GET /chwala/api/?folder=Shared+Folders&collection=&req_id=loading1502857773763&method=file_list&_=1502857773203)
I am not sure if both of these reports have to do something with this issue. Any help?
An important question I'd like to ask additionally, is where files in the Kolab Storage are located.
The PHP warning has been fixed in https://git.kolab.org/rIb288663edb91825817abd573e649acb21a731698, but this and the other error are likely irrelevant.
Files are stored as mail messages in imap, the same as we do for events, tasks, notes, and contacts.
It looks like you're using Ubuntu?
So, I'd check if the files are really empty or maybe it's just some issue in stored metadata. There was such an issue in old times where php-mail-mime package was outdated and caused storing size=0, but it should not be an issue anymore on recent systems.
@alec Yes I am using an Ubuntu 16.04 on both machines. The PHP7 warning fix seems to work, after I changed the file manually.
After I changed the directory to /var/spool/imap/domain/e/example.com/s/shared/Shared Files/ I discovered the following:
- Once I deleted files, which were uploaded using roundcube, they are still available inside this folder with their respective number.
- When uploading the files using WebDAV with Nautilus, there is no content, only a file description.
And also I tried experimenting a lot with the Nginx configuration file:
- After adding "fastcgi_param WEBDAV 1;" to my location block of iRony in kolab.conf I get the error message: "Kein WebDAV-fähiger Speicher" (no WebDAV-capable storage) while establishing a connection with Nautilus
- Enabling dav_ext_methods after installing nginx-extras did not help at all
What WebDAV clients are working? Can you give me certain information about nautilus?
I also use the exact same configuration file as mentioned in "Single domain configuration"
@alec I found out something interesting: When I use ES File Explorer on my Android phone it seems to transfer the file (Nautilus on the other hand created only a file about the specs such as the filename without actual data). The newly created file by ESFE appeared in my mailbox and a big block of alphanumeric letters is inside.
Whats more strange, that there is still a 0 bytes error. I try to download the file using Nautilus and ESFE and the files are empty. Probably as you said, a issue in stored metadata.
Is it possible to increase the compatibility of WebDAV clients? I also tried the Total commander app before (which did not even create a file in my mailbox)
@alec I still do not know how to fix this. Can you make some suggestions?
since i get no answer via the mailinglist, perhaps it works here.
I have the same problem using an external webdav server (nextcloud).
Reading the docs and the source, the sabreclient 2.1.6 will be used.
It's quite old and nextcloud 12 uses sabreDav 3.x.
I can GET files but not upload then via roundcube files app or save to cloud.
A file will be generated, that's the first part (0 bytes) and then the file should be uploaded via PUT.
Perhaps Alexander can give me a hint how to enable debugging to get the headers sent to the server (content-length etc.)
For now i will try to create my own webdav module with debugging options.
Also , if a have time, i will strace all services and debug in depth.
i filed a bug report and supplied a fix for the "problem".