core icon indicating copy to clipboard operation
core copied to clipboard

Deleting file or folders is not possible if folder shared between two computers/users (they keep on reappearing)

Open jonathanernst opened this issue 13 years ago • 22 comments

Situation

One user "admin" shares one folder with subfolders and files with user1 and user2 who are using the official client to sync their root folders.

Expected behaviour

Deleting files or folders from user1 should delete it on "admin"'s owncloud and the deletion should be replicated on user2's owncloud local folder.

Actual behaviour

Files are deleted from the server, then files are resent from user2's computer so that deleted files are back on user1's computer after some time. Making folder sharing very problematic.

Server configuration

Operating system: Ubuntu 12.10

Web server: Apache 2.2

Database: MySQL 5.5

PHP version: 5.4.6

ownCloud version: 5.0

Client configuration ownCloud 1.2.1

jonathanernst avatar Mar 17 '13 21:03 jonathanernst

Did the admin give the users delete permission on the share?

MTGap avatar Mar 17 '13 21:03 MTGap

Yes they have create, delete, edit and share permission. The only way to delete files is to delete them from both user1 and user2's ownclouds. Same issue happens if I rename a folder when I'm on user1's computer ; I then end up with both the old name and new name because user1 is reuploading the old folder.

jonathanernst avatar Mar 17 '13 21:03 jonathanernst

Is it a group share or individual share to the users?

Do the shared files appear on the web interface for the users?

I don't quite understand how it's possible that the actual files are deleted from the server, but reappear for another user. The client isn't peer 2 peer. Any ideas @dragotin @danimo @schiesbn ?

MTGap avatar Mar 17 '13 21:03 MTGap

user1 and user2 are belonging to a group yes. And the folder is shared to this group.

The shared folders appear on the web interface for the users as subfolders of the Shared folder as expected.

I think they reappear because a copy of the files is still on the local hard disk of the second user. Then the owncloud desktop client seems to think that those deleted files (deleted on user1 and server) are new files and it sends them back to the server instead of deleting those local copies. Then some time later, user1's client gets told by the server that new files are available and redownload them. Net result is that deleted or moved files keep coming back...

jonathanernst avatar Mar 17 '13 21:03 jonathanernst

The shared folders still appear for user1 after deleting on the sync client?

Sharing doesn't duplicate any files when shared, if they are deleted from the admin's filesystem then they are gone.

MTGap avatar Mar 17 '13 21:03 MTGap

The shared folders still appear for user1 after deleting on the sync client?

They disappear from the server's filesystem (and thus don't appear anymore for admin OR user1). But then let's say user2 computer is later booted (remember : user2 computer still has a copy of the deleted file locally stored because it was previously synced), they will reappear because user2 sync client will resend the files instead of deleting the local copy of the files.

Thanks a lot for looking into it btw, it's really appreciated

jonathanernst avatar Mar 17 '13 21:03 jonathanernst

Got it now ;)

So, the sync client doesn't realize that the files were unshared. Edit: deleted

@dragotin How does the sync client handle files deleted on the web interface? What do I need to do for sharing?

MTGap avatar Mar 17 '13 21:03 MTGap

Nope sorry there is no "unsharing" going on.

I have a simpler test case with only two users.

  • admin has a shared folder named "my shared folder (admin)" which contains a subfolder called "test" with many files in it
  • user1 who has access to admin's shared folder is using the desktop sync client and now has a copy of all admin's shared files and folder.
  • admin decides to delete some files in "my shared folder (admin)/test" (let's say he issues rm ~/ownCloud/my\ shared folder\ (admin)/test/*.pdf) and files are gone from admin's client and then from the server
  • then later on, owncloud sync client on user1's computer doesn't delete its local copy of files but instead reuploads all those deleted pdfs to the server
  • then later on again the pdfs are redownloaded by admin's computer and I'm back to square one

jonathanernst avatar Mar 17 '13 21:03 jonathanernst

Sorry to make you have to type all that up. I understood, I just said unshared by accident.

MTGap avatar Mar 17 '13 21:03 MTGap

This issue may be related to owncloud/mirall#456

benedetto avatar Mar 20 '13 19:03 benedetto

@dragotin @danimo Any thoughts?

MTGap avatar Apr 08 '13 00:04 MTGap

We have this problem, and it really makes it difficult to be organized. We want to be able to move older projects out of the "Projects" share into the "Archived Projects" share, but even though we can move the folder locally and it is uploaded to Archived Projects, one of the various workstations will upload the old folder again to "Projects" and so we can't be rid of them. Even if we delete from the web interface, it'll reappear. This basically means we can never delete anything, just add more stuff.

We have a dozen or so workstations (some on older clients, some on 1.2.5) and the shares are shared via LDAP groups, and are fully writable by the members of the group, so its not a permissions thing.

jonathanvaughn avatar May 22 '13 23:05 jonathanvaughn

Hi guys, I'm new in GitHub and just signed up to comment this issue because I used a workaround dealing with this. I hope this works for you too. I manage a OwnCloud installation (version 5.0.7) for a small company, we use this as file repository for bigger projects. In one of our projects we have more than 100 users organized in majorly two user groups. One of the users shares a folder with both groups. We faced the problem, that someone synchronized "wrong" folders via the desktop sync client (majorly Windows, versions 1.2.5 and 1.3.0), then deleted them and the folders, without the files within, remained because any client synchronized the folders again and again.

The following procedure helped us to fix this problem:

  1. Create a new temporary folder in the web interface.
  2. Move all folders that cannot be deleted in this temporary folder.
  3. Delete the temporary folder.

ncgwork avatar Jul 17 '13 09:07 ncgwork

I second that syncing/sharing problems between two users. However we could only reproduce it between Windows and Mac sync clients (both the 1.3 stable and the 1.4 beta versions). It does not happen between Linux and Mac clients. Dropbox is version 5.0.10.

My users say that it's very annoying because the scenario of syncing shared folders is their main use case and it used to work with Dropbox.

Signum avatar Aug 19 '13 14:08 Signum

We have this problem too, perfectly described by @jonathanernst in comment https://github.com/owncloud/core/issues/2404#issuecomment-15031868 Server is v.5.0.12 Clients are v.1.4.1 on Windows

This is a big problem, since we too use the shared folders feature as OwnCloud's main use.

Maroldi avatar Oct 15 '13 08:10 Maroldi

@schiesbn Can you look into this?

karlitschek avatar Dec 02 '13 12:12 karlitschek

Just tried to reproduce the steps by @jonathanernst with ownCloud 6RC and sync client 1.4.2 (Linux)... Can't reproduce. Works as expected. Now I will try with ownCloud5.0.13.

schiessle avatar Dec 03 '13 12:12 schiessle

Also works with 5.0.13

I will close it for now. Feel free to retry with the latest version of ownCloud (5.0.13) or an OC6 RC and sync client 1.4.2. If the issue still exists feel free to re-open it.

schiessle avatar Dec 03 '13 12:12 schiessle

The bug exists also in Version 8.0.3! Workaround: look at Comment: ncgwork commented on Jul 17, 2013

The following procedure helped us to fix this problem:

  1. Create a new temporary folder in the web interface.
  2. Move all folders that cannot be deleted in this temporary folder.
  3. Delete the temporary folder.

It works for us.

wuppel avatar May 07 '15 06:05 wuppel

Same problem on owncloud 8.02, debian Wheezy with an external Dropbox storage. Going to test the workaround.

macrophone avatar May 07 '15 08:05 macrophone