Skip to content

Deleteing shared files or folders using WebDAV break synchronisation #4836

Closed

Description

@Signum

Expected behaviour

When a user deletes a file or folder using WebDAV then the sharing (row in "oc_share") should get removed automatically.

Actual behaviour

The row in "oc_share" stays and the sync client of the target user (he who gets the file or folder shard) starts to throw "Problem: 403 Forbidden" errors.

Steps to reproduce

  1. Upload a file
  2. Share the file
  3. Set up syncing with your desktop using the current 1.4 sync client
  4. Delete the file on your desktop
  5. The file will get deleted on the server but the oc_share row stays

The incorrect entries were also found using this query:

SELECT s.id, s.item_source, s.uid_owner, s.file_target, s.share_with FROM oc_share AS s WHERE s.item_source NOT IN (SELECT c.fileid from oc_filecache as c);

Server configuration

Operating system:
Any. Tried on Linux, Windows and MacOS.

Web server:
Apache 2.2.15

Database:
MySQL 5.5.33

PHP version:
PHP 5.4.17

ownCloud version:
5.0.10

Activity

  1. DeepDiver1975 commented on Sep 13, 2013

    @DeepDiver1975
    Contributor

    Cleanup of oc_share is a necessity for oc5 and oc6

    @bartv2 @bantu is there any free time on your side? THX

  2. bantu commented on Sep 13, 2013

    @bantu
  3. DeepDiver1975 commented on Oct 2, 2013

    @DeepDiver1975
    Contributor

    @schiesbn related to the other issue regarding oc_share cleanup

  4. schiessle commented on Oct 2, 2013

    @schiessle
    Contributor

    I tried to reproduce it both with OC5.0.10 and master, desktop client 1.4.1. You are right that the oc_share row is still there after deletion but the sync client continues to work just fine here.

    Which apps do you have enabled? You deleted the file from the shared folder, not from the owner, right?

  5. schiessle commented on Oct 4, 2013

    @schiessle
    Contributor

    @Signum can you try this pull request: #5129 This should make sure that shares get deleted from the oc_share table if the file was deleted

  6. schiessle commented on Oct 7, 2013

    @schiessle
    Contributor

    Fix merged to master (OC6) and backported to stable5 (OC5.0.13)

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions