Skip to content

OC-5.0.4 renamed file sharing failed #2866

Closed

Description

@PisikeSipelgas

Upload a file (eg 1.png). Sharing with link works, but don't share it for now.

Rename it: 1.png -> 2.png

Trying to share with link: "Sharing 26 failed, because the sharing backend for file could not find its source"

From syslog messages:
Apr 11 12:51:41 pilv ownCloud[1256]: {OCP\Share} Sharing 26 failed, because the sharing backend for file could not find its source

From filesystem perspective file is renamed (2.png).

'oc_filecache' table also contains new filename:
path: files/2.png
name: 2.png

And now the trick: delete the file. Go to "Deleted files" and restore. Now sharing with link works again.

Activity

  1. karlitschek commented on Apr 11, 2013

    @karlitschek
    Contributor
  2. blizzz commented on Apr 11, 2013

    @blizzz
    Contributor

    May it be related to the rename hook issue? cc @butonic

  3. Vodochnik commented on Apr 11, 2013

    @Vodochnik

    Related to #2795, #2840 ? :)

  4. butonic commented on Apr 11, 2013

    @butonic
    Contributor

    Trying to reproduce this. Some clarifications:

    1. Upload a file (eg 1.png).
    2. Rename it: 1.png -> 2.png
    3. sharing via link without a page refresh give the error mentioned by @PisikeSipelgas: "Sharing 26 failed, because the sharing backend for file could not find its source"
    4. try scanFiles(true) in the browser console (warning will rescan all files, might take a while. better use a test account), on completion, sharing still fails with the same error
    5. reload page: sharing via link works

    Looking at the db the fileid is no longer present in the db. Further investigation reveals that a file rename also changes the fileid ?!?!? @icewind1991 is this intended? So either we have to update the browser and tell him the new file id, or there is something wrong with file renames.

    digging deeper ...

  5. MTGap commented on Apr 11, 2013

    @MTGap
    Contributor

    Duplicate of #2170

    Come on guys I've described the problem multiple times on the mailing list and in the issue above. @butonic this is exactly what our emails about renaming files is trying to resolve.

  6. butonic commented on Apr 11, 2013

    @butonic
    Contributor

    It seems that OC\Files\Cache\Cache->move($source, $target) is called too late.
    $sourceId = $this->getId($source); returns -1

    @MTGap yeah but this one I can actually reproduce ;)

  7. MTGap commented on Apr 11, 2013

    @MTGap
    Contributor

    All the details are already in my 2 initial emails.

  8. locked as resolved and limited conversation to collaborators on Aug 23, 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