Skip to content

Deleting a folder does not delete affected shares fore files within it #6985

Closed

Description

@butonic

Expected behaviour

When deleting a folder all shares on files within should be deleted as well

Actual behaviour

Only the share for the folder is deleted. Other shares are left in place, cluttering up the oc_share table

Steps to reproduce

  1. Create folder 'foo'
  2. Create file 'foo/bar.txt'
  3. Share file 'foo/bar.txt' via link
  4. Share folder 'foo' via link
  5. Delete folder 'foo'
  6. use sql and SELECT * FROM oc_share WHERE file_target='/bar.txt' to see the leftover share row in the db

@schiesbn @karlitschek something to consider for sharing.

Activity

  1. karlitschek commented on Jan 28, 2014

    @karlitschek
    Contributor

    @schiesbn

  2. PVince81 commented on Mar 12, 2014

    @PVince81
    Contributor

    @schiesbn didn't you mention some automatic process to clean up such old data in another ticket ?

  3. PVince81 commented on May 6, 2014

    @PVince81
    Contributor

    @schiesbn any update on this ?
    How does it affect the new sharing ?

  4. hanibal8 commented on Jun 13, 2014

    @hanibal8

    Also, what I encountered is that if you share that folder with a Group and delete the folder then without unsharing it ... the Group name will stay in the user management even if all members are removed from the group.

    Steps to reproduce:

    1. in user-management assign some users to a new group
    2. share a folder with that group
    3. delete that folder without unsharing it
    4. remove all group members from that group

    Expected behaviour: the group-name should diappear.
    Instead: the group-name stays

  5. PVince81 commented on Dec 5, 2014

    @PVince81
    Contributor

    @schiesbn still occurs on OC 7.0.4 RC1

    @hanibal8 your issue seems to be different, apparently you are expecting that when you delete all users from a group the empty group gets deleted. I think it is fine to keep empty groups. OC 7.0.3 makes it possible to delete groups in the UI, so these can be deleted now by the admin.

  6. PVince81 commented on Dec 5, 2014

    @PVince81
    Contributor

    Interesting, so this is a way to create orphaned share entries from the UI.

    Also happens when sharing with a user instead of with a link.
    And also happens on OC 8 pre-alpha (master 89db2a0)

  7. PVince81 commented on Dec 5, 2014

    @PVince81
    Contributor

    @schiesbn would it be easier to remove these entries without resorting to cleanup scripts, especially with the way how shares are implemented in OC 7 ?

    The orphaned cleanup ticket is here: #12323

  8. PVince81 commented on Mar 23, 2015

    @PVince81
    Contributor

    We might still want to delete orphaned shares in the background, experimental PR here: #14676

  9. PVince81 commented on Mar 23, 2015

    @PVince81
    Contributor

    Assigning to self, I'd say the bkg job is the way to go now.

  10. self-assigned this
    on Mar 23, 2015
  11. added this to the milestone on Mar 23, 2015
  12. PVince81 commented on Apr 9, 2015

    @PVince81
    Contributor

    Fixed through #14676

  13. butonic commented on Apr 9, 2015

    @butonic
    ContributorAuthor

    Thx a lot @PVince81

  14. modified the milestones: , on Apr 9, 2015
  15. 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

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions