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

Share inaccessible if folder with same name was deleted and recreated #1787

Closed
kulmann opened this issue Mar 10, 2021 · 5 comments
Closed

Share inaccessible if folder with same name was deleted and recreated #1787

kulmann opened this issue Mar 10, 2021 · 5 comments
Labels

Comments

@kulmann
Copy link
Member

kulmann commented Mar 10, 2021

Describe the bug

Kind of edge case but IMO still valid: When a user creates and shares a folder, deletes it, creates a new folder with the same name and shares it again, it is not accessible for the share receiver.

Steps to reproduce

Steps to reproduce the behavior:

  1. Login as einstein
  2. Create folder test
  3. Share test with marie
  4. Login as marie
  5. Accept shared folder test
  6. Verify that test is accessible
  7. Login as einstein again
  8. Delete test (doesn't matter if only moved to trashbin or also wiped from there)
  9. Create a new folder test (same name as before)
  10. Share test with marie (again)
  11. Login as marie
  12. Accept shared folder test

Expected behavior

The shared folder test is accessible in the files app.

Actual behavior

The shared folder test is not accessible in the files app. Web UI shows a Resource not found page. Propfind on the folder returns a 404:

Request URL: https://localhost:9200/remote.php/webdav/Shares/test
Request Method: PROPFIND
Status Code: 404 Not Found

Setup

ocis v1.3.0-rc1 on localhost, run with go run cmd/ocis/main.go server.

OCIS_VERSION=v1.3.0-rc1
BRANCH=v1.3.0-rc1

@individual-it
Copy link
Member

individual-it commented Mar 10, 2021

  • ToDo QA:team check if there are API tests for that case and if not add them

@kulmann kulmann mentioned this issue Mar 10, 2021
16 tasks
@dpakach dpakach self-assigned this Mar 10, 2021
@dpakach
Copy link
Contributor

dpakach commented Mar 10, 2021

For the record, this error only exists on the OCIS storage driver and we get this response when accepting the share

{"ocs":{"meta":{"status":"error","statuscode":996,"message":"grpc update received share request failed"}}}

and these logs

2021-03-10T20:07:17+05:45 WRN home/dipakacharya/go/pkg/mod/github.com/cs3org/reva@v1.6.1-0.20210223065028-53f39499762e/internal/grpc/services/storageprovider/storageprovider.go:544 > path not found when stating pkg=rgrpc service=storage traceid=d37512701b0b801d83820b0729028441
2021-03-10T20:07:19+05:45 INF access-log from=[::1]:47776 method=DELETE path=/ocs/v2.php/apps/files_sharing//api/v1/shares/pending/9c3dd3fc-94c7-4548-b12e-3dc1b3143814 service=proxy
2021-03-10T20:07:19+05:45 ERR home/dipakacharya/go/pkg/mod/github.com/cs3org/reva@v1.6.1-0.20210223065028-53f39499762e/internal/grpc/services/gateway/usershareprovider.go:343 > error updating received share error="gateway: update of display name is not yet implemented" pkg=rgrpc service=storage traceid=f2135de2d4403128ed5a9374d83fc27a
2021-03-10T20:07:19+05:45 ERR grpc update received share request failed error="code: 14, message: error updating received share" pkg=rhttp service=storage traceid=f2135de2d4403128ed5a9374d83fc27a
2021-03-10T20:07:19+05:45 ERR http end="10/Mar/2021:20:07:19 +0545" host=127.0.0.1 method=DELETE pkg=rhttp proto=HTTP/1.1 service=storage size=106 start="10/Mar/2021:20:07:19 +0545" status=500 time_ns=3264371 traceid=f2135de2d4403128ed5a9374d83fc27a uri=/ocs/v2.php/apps/files_sharing//api/v1/shares/pending/9c3dd3fc-94c7-4548-b12e-3dc1b3143814?format=json url=/ocs/v2.php/apps/files_sharing//api/v1/shares/pending/9c3dd3fc-94c7-4548-b12e-3dc1b3143814?format=json
2021-03-10T20:07:20+05:45 INF access-log from=[::1]:47776 method=GET path=/ocs/v2.php/apps/files_sharing//api/v1/shares service=proxy
2021-03-10T20:07:20+05:45 WRN home/dipakacharya/go/pkg/mod/github.com/cs3org/reva@v1.6.1-0.20210223065028-53f39499762e/internal/grpc/services/storageprovider/storageprovider.go:544 > path not found when stating pkg=rgrpc service=storage traceid=10f127b860a359b2e14e7bb31db05758
2021-03-10T20:07:23+05:45 INF access-log from=[::1]:47776 method=POST path=/ocs/v2.php/apps/files_sharing//api/v1/shares/pending/9c3dd3fc-94c7-4548-b12e-3dc1b3143814 service=proxy
2021-03-10T20:07:23+05:45 INF mount path will be:/home/Shares/test pkg=rgrpc service=storage traceid=fe31870cdc93760f3b67afa02a908cb1
2021-03-10T20:07:23+05:45 ERR error calling CreateReference error="error: already exists: Shares/test" pkg=rgrpc service=storage traceid=fe31870cdc93760f3b67afa02a908cb1
2021-03-10T20:07:23+05:45 ERR home/dipakacharya/go/pkg/mod/github.com/cs3org/reva@v1.6.1-0.20210223065028-53f39499762e/internal/grpc/services/storageprovider/storageprovider.go:1028 > error creating reference error="error: already exists: Shares/test" pkg=rgrpc service=storage traceid=fe31870cdc93760f3b67afa02a908cb1
2021-03-10T20:07:23+05:45 ERR home/dipakacharya/go/pkg/mod/github.com/cs3org/reva@v1.6.1-0.20210223065028-53f39499762e/internal/grpc/services/gateway/usershareprovider.go:422 > error updating received share error="gateway: grpc failed with code CODE_INTERNAL" pkg=rgrpc service=storage traceid=fe31870cdc93760f3b67afa02a908cb1
2021-03-10T20:07:23+05:45 ERR grpc update received share request failed error="code: 15, message: error updating received share" pkg=rhttp service=storage traceid=fe31870cdc93760f3b67afa02a908cb1
2021-03-10T20:07:23+05:45 ERR http end="10/Mar/2021:20:07:23 +0545" host=127.0.0.1 method=POST pkg=rhttp proto=HTTP/1.1 service=storage size=106 start="10/Mar/2021:20:07:23 +0545" status=500 time_ns=12980914 traceid=fe31870cdc93760f3b67afa02a908cb1 uri=/ocs/v2.php/apps/files_sharing//api/v1/shares/pending/9c3dd3fc-94c7-4548-b12e-3dc1b3143814?format=json url=/ocs/v2.php/apps/files_sharing//api/v1/shares/pending/9c3dd3fc-94c7-4548-b12e-3dc1b3143814?format=json
2021-03-10T20:07:23+05:45 INF access-log from=[::1]:47776 method=GET path=/ocs/v2.php/apps/files_sharing//api/v1/shares service=proxy
2021-03-10T20:07:23+05:45 WRN home/dipakacharya/go/pkg/mod/github.com/cs3org/reva@v1.6.1-0.20210223065028-53f39499762e/internal/grpc/services/storageprovider/storageprovider.go:544 > path not found when stating pkg=rgrpc service=storage traceid=e7b9980274c591b2cf6b09e050cccda4

@dpakach
Copy link
Contributor

dpakach commented Mar 12, 2021

Tests added in owncloud/core#38490

@dpakach dpakach removed the QA:team label Mar 12, 2021
@ScharfViktor ScharfViktor added the Priority:p3-medium Normal priority label Sep 7, 2021
@ScharfViktor
Copy link
Contributor

re-tested with local server oCIS version 1.11.0
still relevant
Status Code: 500 Internal Server Error
{"ocs":{"meta":{"status":"error","statuscode":996,"message":"grpc update received share request failed"}}}

@rhafer
Copy link
Contributor

rhafer commented Mar 5, 2024

I am closing this in favor of #7895

@rhafer rhafer closed this as completed Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants