OC 5.0.0 sharing files via web link not working
OC 5.0.0 sharing files via web link sends to user an e-mail with URL, but after clicking "download" button it says that "cloud not found".
I can confirm that. Sharing via weblink not working at all in OC 5.0.
Error: "cloud not found"
I can confirm that too. Sharing via weblink gives me "cloud not found" error too when trying to download the shared file. I noticed that it also shows the first letter of the filename bellow that error. Log actually shows:
{"app":"PHP","message":"fopen(/var/www/html/owncloud/data/XXXXXX/files/ff/s): failed to open stream: No such file or directory at /var/www/html/owncloud/lib/files/storage/local.php#143","level":2,"time":1363259010}
The actual filename for the file I tried to download was screenshot-1362394056765.png. The same happens with all folders and filenames and log always shows path to users data, file and first letter of the filename.
@PisikeSipelgas Please update the issue using this template: https://raw.github.com/owncloud/core/master/issue_template.md
@MTGap @schiesbn
Expected behaviour
Should be able to download file.
Actual behaviour
Generates an error "cloud not found"
Steps to reproduce
- Share a file with web link (file name for example: test.png).
- Open URL from recieved e-mail (https://something/public.php?service=files&t=441c49d0d73b3261cae0be38203ae7ec)
- Web page says: Pisike Sipelgas shared the file test.png with you
- Click "Download"
- https://something/public.php?service=files&t=441c49d0d73b3261cae0be38203ae7ec&download Page displays "Cloud not found" error with single "I" letter.
Server configuration
Operating system: FreeBSD 8.3-RELEASE-p3
Web server: Apache 2.2.22
Database: Mysql 5.5.25
PHP version: PHP 5.4.4
ownCloud version: 5.0.0 OC is installed to /usr/local/www/owncloud/ Datastore is: /data/owncloud/
Client configuration
Browser: FF19/IE10/Chrome
Operating system: FreeBSD/Windows
Logs
Web server error log
Insert your webserver log here
client.example.com - - [14/Mar/2013:14:31:46 +0200] "GET /public.php?service=files&t=441c49d0d73b3261cae0be38203ae7ec HTTP/1.1" 200 2562 client.example.com - - [14/Mar/2013:14:31:46 +0200] "GET /remote.php/core.css HTTP/1.1" 304 - client.example.com - - [14/Mar/2013:14:31:46 +0200] "GET /index.php/apps/files_sharing/css/public.css HTTP/1.1" 304 - client.example.com - - [14/Mar/2013:14:31:46 +0200] "GET /index.php/core/js/config.js HTTP/1.1" 200 748 client.example.com - - [14/Mar/2013:14:31:46 +0200] "GET /remote.php/core.js HTTP/1.1" 304 - client.example.com - - [14/Mar/2013:14:31:46 +0200] "GET /index.php/core/routes.json HTTP/1.1" 304 - client.example.com - - [14/Mar/2013:14:31:46 +0200] "GET /index.php/core/ajax/share.php?fetch=getItemsSharedStatuses&itemType=file HTTP/1.1" 200 76 client.example.com - - [14/Mar/2013:14:31:46 +0200] "GET /cron.php HTTP/1.1" 200 20 client.example.com - - [14/Mar/2013:14:33:46 +0200] "GET /public.php?service=files&t=441c49d0d73b3261cae0be38203ae7ec&download HTTP/1.1" 404 1394
ownCloud log (data/owncloud.log)
{"app":"PHP","message":"fopen(/data/owncloud/Pisike_Sipelgas/files/I): failed to open stream: No such file or directory at /usr/local/www/owncloud/lib/files/storage/local.php#143","level":2,"time":1363264104}
I have found the following:
In the official owncloud repo file lib/files.php (Line 53 - 55)
if (is_array($files) && count($files) == 1) {
$files = $files[0];
}
In the tar-File i have downloaded there are these lines:
if (count($files) == 1) {
$files = $files[0];
}
Some failure in packaging?
Changed the lines in /lib/files.php to the code in previous post and now sharing works as it should
Sadly we discovered this bug only after the release was prepared. In the next bug fix release the issue will be solved. In the meantime you can just update the file like described by @virusbrain
There is another bug if you share a folder with a public link. You can't select multiple files and download them. If you want to fix it before the next bug fix release you can apply this patch: https://github.com/owncloud/core/pull/2272/files
I can confirm: this is bug in 5.0 version.
This advice fixes problem:
https://github.com/owncloud/core/issues/2291#issuecomment-14900368
Hi guys,
i have a problem with this solution...
I use
-OC 5.0.3 -PHP Version 5.3.2-1ubuntu4.19 -Apache/2.2.14 (Ubuntu)
/lib/files.php In my cfg this snippet destroy the files array
if (is_array($files) && count($files) == 1) { $files = $files[0]; }
$files[0] deliveres a string like that ["filename1","filename2","filename3"].
Everytime function count is calling the result is 1. But I have select 3 files for download.
PHP tells something about the count function (http://www.php.net/manual/en/function.count.php): Returns the number of elements in var. If var is not an array or an object with implemented Countable interface, 1 will be returned. There is one exception, if var is NULL, 0 will be returned.
I'm confused...
mastermin
Any ideas?
Hi folks,
I'm frustrated :(... the patches above are included in OC 5.0.3.... I have checked this after downloading this one
http://download.owncloud.org/community/owncloud-5.0.3.tar.bz2
What shall I say? It doesn't work.
I get alway the same error: cloud not found...
Is it possible to re-open this issue? More details about that you will find above (2 days ago)...
mastermin
OC 5.0.3: sharing with e-mail and download IS working.
I tried it again with 5.0.3. I shared a directory with three files in it via link. I open the link from inside my mail. I see all three files, I mark them with the checkboxes. I download the zip file with all three files in it. So I don't see any problem. Scientifix Linux 6.4, php 5.3.3, apache 2.2.15
Ok dirkous,
i will give you a shared link... do you have a mail address?
Yes, but I won't put it on a public forum. BTW, I'm not an OC developer, just a user. So I can't help you with that.
ok, how can i get your mail address?
this error occurs in my owncloud.log
{"app":"PHP","message":"fopen(/var/www/owncloud/data/admin/files/Testing/[/"text1.rtf/",/"text2.rtf/",/"text3.rtf/"]) [function.fopen</a>]: failed to open stream: No such file or directory at /var/www/owncloud/lib/files/storage/local.php#143","level":2,"time":1365157213}
I can confirm that creating a share link, copy&pasting it into a browser leads to the message "Cloud not found".
Server: Ubuntu 12.04.2 Database: MySQL 5.5 Browser: Firefox 20.0
I also checked /lib/files.php and line 53 looks like the upper one mentioned above by virusbrain
If you need further information, e.g. logfiles etc. just tell me what to post.
Kai, thanks a lot for your confirmation!
Am 05.04.2013 um 23:15 schrieb KaiThoma [email protected]:
I can confirm that creating a share link, copy&pasting it into a browser leads to the message "Cloud not found".
Server: Ubuntu 12.04.2 Database: MySQL 5.5 Browser: Firefox 20.0
I also checked /lib/files.php and line 53 looks like to upper one mentioned above by virusbrain
If you need further information, e.g. logfiles etc. just tell me what to post.
— Reply to this email directly or view it on GitHub.
I can't reproduce. Someone has to provide additional details, I tried all possible cases I could think of.
Hi mtgap, many thanks for your testing!
In my case the $files var contains this one:
["text1.rtf","text2.rtf","text3.rtf"]
and the result of count is 1, not 3 like expected.
In my opinion that is a error.