Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Orphaned share when moving a shared folder into another #13356

Closed
PVince81 opened this issue Jan 14, 2015 · 4 comments
Closed

Orphaned share when moving a shared folder into another #13356

PVince81 opened this issue Jan 14, 2015 · 4 comments

Comments

@PVince81
Copy link
Contributor

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

@PVince81 PVince81 added this to the 8.1-next milestone Jan 16, 2015
@PVince81
Copy link
Contributor Author

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

@PVince81
Copy link
Contributor Author

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 ?

@PVince81
Copy link
Contributor Author

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

@PVince81
Copy link
Contributor Author

Raised here: #15591

@lock lock bot locked as resolved and limited conversation to collaborators Aug 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant