Unable to download files FROM Owncloud Server over Internet - Gets to around 90% then fails



Please help us by providing the following info. Before posting please also check the pinned "Known issues" threads and make sure that you're running the latest available version for your oC release: https://owncloud.org/changelog/

Steps to reproduce
1. Select a file or files to download
2. Download to Computer or Android Client
3. Download gets to around 80 - 90 % then fails

Expected behaviour
Downloads fully

Server configuration
Operating system: Ubuntu 14 LTS (Fully upto date)
Web server:Apache2
PHP version:9.1.0
ownCloud version (see ownCloud admin page):
Updated from an older ownCloud or fresh install:Updated from 9.0
ownCloud log (data/owncloud.log, see https://central.owncloud.org/t/how-to-find-webserver-or-oc-logfile-enable-php-logfile/808):

Special configuration (external storage, external authentication, reverse proxy, server-side-encryption):
Storage is external on SMB shares.

Hey all.
I have quite a strange one here with regards to downloading files over the internet from my Owncloud box whereby the downloads fail when they get to about 80 or 90% during testing. (Around 2-3MB Pdf's)

Locally, when logged into my Owncloud server on my LAN and downloading, it iworks perfectly, however, accessing via the Internet the downloads are failing. This would appear to rule out my Owncloud install, my SMB share etc as its working fine on the LAN.

It cant be the firewall as it wouldn't work at all, I see nothing on my router to indicate an issue, packet loss on the WAN link is 0% according to my pfSense box. I did have snort and PFBlockerNG running on my router also but disabling them makes no difference.

The owncloud.log file, despite being set to log full logging, shows nothing during the time i browse my box via the android app and whilst downloading / failing, however the log file is updating with other things. I used tail -f owncloud.log to observe it during the download testing. Note - i've also tried downloading from my work computer via the internet (VPN to work) and this also fails at the same point.

Apache error logs show nothing.

And when uploading to other sites - imgur, Google etc - i have no issues so i don't think its my WAN connections upload.

Can anyone help to point me towards some more troubleshooting that i can do here?

Download failed on >2Gb files on SMB/CIFS Storage

Is it only for PDF files? Do you use the integrated PDF-viewer or do you really download the file itself?


Thanks for replying - no its any file really, zips, jpg's, i just used the PDF's as an example.

Does anyone know how i can find out why these are failing - other than just seeing a download failed message?

I cant see it being my internet connection as these files would be downloaded via TCP anyway so even if my internet was wobbly (for which i see no evidence at all outside this issue) then packets would be retransmitted and the file should download as it does via the LAN.

But then it works via the LAN which would point to a WAN issue.

Is there any method of testing packet loss over an ISP WAN link that you know off? Any way to get more logging out of owncloud so that i can see some sort of indication as to why these are failing?


EDIT:- Ok, progress - I have the following setup...

Internet -> Router -> Owncloud WebServer -> Filesever (Running Samba mounted via "External Storage" in Owncloud

If i try and download files located on the Fileserver then it gets to about 90 odd percent and fails but ONLY when accessing from the Internet - its ok via LAN.

If i then copy the same files from the Fileserver to the Owncloud WebServer Data folder then i CAN download without issue over the internet.

So it seems that when i try to download ONLY from the Internet and ONLY when the file is stored on the FileServer that there is an issue.



Ok, whittled this down to it being SMB filesharing on my Fileserver - even though it works perfectly on the LAN it just would not play well when it came in over the Internet attached as external storage on Owncloud.

In Owncloud i switched my external storage from SMB to SFTP, shared the same files and this works perfectly.

So, no idea why Samba wasn't working properly but at least I now have a working Owncloud instance again.


Interesting. Has SMB been working on OC 9.0?



To be honest, im not sure, i don't tend to use it all that often as for me its a nice to have rather than something i rely on every day and only noticed last week.

I did wonder if this could be related to the External Storage app....


More likely because of some timeouts on webserver side as the connection goes like:

SMB <-> ownCloud <-> WAN

If the connection "over the Internet" is not that fast there will be timeouts


I increased the logging level on smb.conf to 10 and tailed the log file whilst the download was taking place and saw nothing.

If it was a timeout i saw no indication of it.


Timeout on webserver / PHP level won't be logged in your SMB logs.


I run into the same problem - with owncloud 9.1.1. The funny thing about: I have two installations configured exactly the same and both behave different.

The setup is Samba <-> Owncloud <-> WAN over DSL

When I access the one owncloud in the local lan everything works fine. From outside all downloads stop after about 2 MB. I can't find anything inside apache, php or samba log. Like for TheBR this error occurs only for the files on external samba storage not for genuine oc storage.

The other installation works fine. From local lan and from outside.

The only difference between the installations where two thins:

  1. The (working) oc was accessed through an ssh reverse-tunnel to an nginx reverse proxy (because of the lack of an statical IP)

  2. The working oc is 9.0 the other one I already upgraded to 9.1.1

So tried both on the other installation: Accessing it throug reverse proxy and ssl tunnel and downgraded it to 9.0. Still the same problem with one difference:

Through the reverse proxy I can now download about 14 MB. But not more. Afterwords again abortion.

Through sftp instead of smb there is no problem. But file browsing is much slower.

Any ideas how to increase logging? Any other ideas. Somebody else run into this problem?


For what its worth, my issue occurred via an haproxy reverse proxy to an apache server so i that may not be relevant (given your working one is also through a reverse proxy).


yes, this is the curious thing. The working one is throug ssl-tunnel and reverse proxy.
But did you solve your problem anyhow? I still get no reasonable debugging information. No idea if the problem is samba, php, tranmission.

I also tried with different mtu - but no effect.


I only "solved" my issue by moving to SFTP, i could find no log file which showed ANY issue unfortunately. I still use samba to access the file store from my LAN to my PC but owncloud needs to use SFTP for it to work properly.


Thanks TheBR for info. This seems to be the quick solution. But for me sftp looks slower. How are your experiences?

Nevertheless we should try to debug further. It looks like the bug reported: