Skip to content

Orphaned share when moving a shared folder into another #13356

Closed

Description

@PVince81

Steps to reproduce

  1. Create three users "user1", "user2" and "user3"
  2. Login as "user1"
  3. Create two folders "test2" and "test3"
  4. Share "test2" with "user2"
  5. Share "test3" with "user3"
  6. Move "test3" into "test2"
  7. Check the share dropdown on "test2/test3"
  8. Login as "user3" and see if "test3" is still visible
  9. Now login as "user2"
  10. Create a folder "test4"
  11. Share "test4" with "user3"
  12. Move "test4" into "test2"
  13. Check the share dropdown on "test2/test4"
  14. Login as "user3"

Expected result

"user3" still has access to "test3" and "test4"
Share dropdown for "test2/test3" shows that it is shared with user3.
Share dropdown for "test2/test4" shows that it is shared with user3.

Actual result

"user3" only has access to "test3" (the one moved by owner of both shares)
"user3" does NOT have access to "test4", and the share dropdown doesn't show it.
The database shows that the former share for "test4" is orphaned, pointing to a non-existing id:
select * from oc_share where item_source not in (select fileid from oc_filecache);
Could be partially due to file id instability: #13310

Please note that the orphaned shares do not appear in the list "Shared with you".
I remember seeing reports in the past where it did.

Versions

stable7 (4d42485)
master (65ee2b1)

@schiesbn this could explain the orphaned shares we see from times to times

@SergioBertolinSG @jnfrmarks another interesting test case

Activity

  1. added this to the milestone on Jan 16, 2015
  2. PVince81 commented on Jan 16, 2015

    @PVince81
    ContributorAuthor

    File id stability #13310 is not fixable in 8.0. Deferring to 8.1 as per the blocking ticket.

  3. PVince81 commented on Apr 14, 2015

    @PVince81
    ContributorAuthor

    File id isn't an issue an more, it was fixed: #13310

    The share information is now kept.
    However there are additional issues: when moving "test4" into "test2", login as user3 and "test4" appears. But it is not possible to navigate into "test4".

    I suspect that moving the shares doesn't properly update the parent-child relationships of the shares.
    This error appears in the log:

    {"reqId":"thauO4joDyi01YHsuPCi","remoteAddr":"127.0.0.1","app":"files_sharing","message":"Unable to get mount for shared storage '3' user 'user2'","level":3,"time":"2015-04-14T08:50:01+00:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/list.php?dir=%2Ftest4&sort=name&sortdirection=asc"}
    {"reqId":"thauO4joDyi01YHsuPCi","remoteAddr":"127.0.0.1","app":"files_sharing","message":"Unable to get mount for shared storage '3' user 'user2'","level":3,"time":"2015-04-14T08:50:01+00:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/list.php?dir=%2Ftest4&sort=name&sortdirection=asc"}
    

    @schiesbn do we even have logic that updates parent-child relationships when moving a share into another ?

  4. PVince81 commented on Apr 14, 2015

    @PVince81
    ContributorAuthor

    Since this issue here is about orphaned shares, I'll raise another one with less steps.

  5. PVince81 commented on Apr 14, 2015

    @PVince81
    ContributorAuthor

    Raised here: #15591

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions