Skip to content

OC 5.0.0 sharing files via web link not working #2291

Closed

Description

@PisikeSipelgas

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".

Activity

  1. laegi commented on Mar 14, 2013

    @laegi

    I can confirm that. Sharing via weblink not working at all in OC 5.0.

    Error: "cloud not found"

  2. peltzi commented on Mar 14, 2013

    @peltzi

    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.

  3. tanghus commented on Mar 14, 2013

    @tanghus
    Contributor
  4. PisikeSipelgas commented on Mar 14, 2013

    @PisikeSipelgas
    Author

    Expected behaviour

    Should be able to download file.

    Actual behaviour

    Generates an error "cloud not found"

    Steps to reproduce

    1. Share a file with web link (file name for example: test.png).
    2. Open URL from recieved e-mail (https://something/public.php?service=files&t=441c49d0d73b3261cae0be38203ae7ec)
    3. Web page says: Pisike Sipelgas shared the file test.png with you
    4. Click "Download"
    5. 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}

  5. virusbrain commented on Mar 14, 2013

    @virusbrain

    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?

  6. pdelange commented on Mar 14, 2013

    @pdelange

    Changed the lines in /lib/files.php to the code in previous post and now sharing works as it should

  7. schiessle commented on Mar 14, 2013

    @schiessle
    Contributor

    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

  8. dkorzhevin commented on Mar 19, 2013

    @dkorzhevin

    I can confirm: this is bug in 5.0 version.

    This advice fixes problem:

    #2291 (comment)

  9. mastermin commented on Apr 3, 2013

    @mastermin

    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?

  10. mastermin commented on Apr 5, 2013

    @mastermin

    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

  11. PisikeSipelgas commented on Apr 5, 2013

    @PisikeSipelgas
    Author

    OC 5.0.3: sharing with e-mail and download IS working.

  12. dirkuos commented on Apr 5, 2013

    @dirkuos

    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

  13. mastermin commented on Apr 5, 2013

    @mastermin

    Ok dirkous,

    i will give you a shared link... do you have a mail address?

  14. 34 remaining items

  15. karlitschek commented on Apr 11, 2013

    @karlitschek
    Contributor

    @MTGap @schiesbn What do you think?

  16. MTGap commented on Apr 11, 2013

    @MTGap
    Contributor

    It's fine that parent is null. Check your oc_filecache table in the database to see if a row exists with id 32.

  17. KaiThoma commented on Apr 11, 2013

    @KaiThoma

    @MTGap: yes, row with id 32 exists and field name matches the file i like to link to.
    Should field path contain the username?
    like username/files/picture.jpg?
    or just /files/picture.jpg?

  18. KaiThoma commented on Apr 12, 2013

    @KaiThoma

    I got my problem solved!

    table oc_storages contained an entry local::/var/www/owncloud/data/Kai
    with uppercase K
    but my username ist kai with lowercase k
    most likely this happened because i switched my displayname some time ago.

    AFAIK i was the last one getting this message "Cloud not found" i guess you can close this issue.

  19. LogIN- commented on Apr 12, 2013

    @LogIN-

    it could also be wrong http server config, apache or nginx so also check that

  20. RandolfCarter commented on Apr 13, 2013

    @RandolfCarter
    Contributor

    Upgraded from 4.5.8 to 5.0.4 (manually, not with the Automatic Updater, i.e. removing everything but data&config), and was seeing the "Cloud not found"... nothing in the error logs.
    The reason was that the share was removed during the upgrade (at least the file didn't show up as shared anymore). Would be cool if the GUI instead of "Cloud not found" could write a more appropriate message like "Share not found?"

    Edit: Just checked, strangely enough I still see the old entry for the particular folder in the oc_share table - I now have two entries for the same path but different tokens, and only one of them seems to work... how is this supposed to work? The item_source/item_target values are different, so I guess the old share refers to an old entry in the fs/filecache table, and was never updated to point to the new one? Maybe because my upgrade process was a bit bumpy (#2908)?

  21. schiessle commented on Apr 13, 2013

    @schiessle
    Contributor

    @KaiThoma display name shouldn't affect the entries in any internal db table. Would be great if you could re-test this by changing the display name again and see if this really effects the public link share.

  22. xtruthx commented on Apr 15, 2013

    @xtruthx

    hello folks, i need help on this. Got this bug after a Update from 4.5.1a to OC Version 4.5.9. And the mentioned code change did not work, because there is totaly different code sector in files.php then above.

    so all old shares via link are broken with "Cloud not found".

    Installation is on Debian Squeeze with SQL-Lite and the Customer use this installation for his evaluation.

    thx for help

  23. mastermin commented on Apr 16, 2013

    @mastermin

    @schiesbn and @KaiThoma:
    changing display has no effect to shared link. i have done the re-test...
    @KaiThoma: maybe you have changed the real name under the hood?

    mastermin

  24. francoistrahan commented on Apr 19, 2013

    @francoistrahan

    Hey there. I have the same probem happening here.

    I have a brand new server with a manual installation, no production use and the same problem. I'd really like to see it fixed so I'm willing to help.

    My configuration and owncloud installation is under a versionning system so I don't mind messing with the code and / or config and I am also ok to navigate the database.

    I don't know your code base and unfortunately don't have that much time to investigate, but I'm more than happy to carry on some tests and give feed back, should it be usefull to anyone...

    cheers,

  25. francoistrahan commented on Apr 19, 2013

    @francoistrahan

    by the way, if I open the link from a browser where I'm logged in, it works. In a browser that's not logged in, does not.

  26. KaiThoma commented on May 7, 2013

    @KaiThoma

    @schiesbn I tried changing my display name back and forth but did not succeed in reproducing the situation mentioned above.
    And I agree with @RandolfCarter that a more detailed errormessage like "Share '/var/www/owncloud/data/Kai' not found" would help finding the problem.

  27. jancborchardt commented on Aug 4, 2013

    @jancborchardt
    Contributor

    I’m closing this bug because it has been in »Needs Info« state for longer than a month. Please reopen if the error still persists with ownCloud 5.0.9 (the latest stable version) and then please use the issue template.

    Or best open a completely new issue because this is probably the longest discussion I ever saw and no one will bother to read it.

  28. locked as resolved and limited conversation to collaborators on Aug 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions