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

Files remain if deleting account #125

Closed
svenclemens opened this issue Apr 16, 2013 · 29 comments · Fixed by #3336
Closed

Files remain if deleting account #125

svenclemens opened this issue Apr 16, 2013 · 29 comments · Fixed by #3336
Assignees
Milestone

Comments

@svenclemens
Copy link

svenclemens commented Apr 16, 2013

Expected behaviour

If deleting an account the files on the device associated to the account should get deleted.

Actual behaviour

The account get deleted but the files will remain.

Steps to reproduce

  1. Download some files
  2. Deleting your account (in owncloud app)
  3. View downloaded files in file manager

Environment data

Android version: 4.1.2

Device model: Samsung Galaxy S2

Stock or customized system: Stock

ownCloud app version: 1.3.20

ownCloud server version: 4.5.7


EDIT (July 2021)

Check #125 (comment)

  • App removal -> to do here

By removing account from oC app, remove the account folder from app storage.

  • Device Settings removal -> future feature (worker)
@davivel
Copy link
Contributor

davivel commented Apr 17, 2013

This is a policy. We know there are environments where files should be deleted from the mobiles when an account is removed, but ownCloud covers a wide range of uses. Maybe (just guessing, I don't really know) at some point the ownCloud server can allow the administrator to decide if files should be removed in mobiles when an account is deleted. Maybe an option in the mobile devices to allow the users decide could be interesing too. But, in my opinion, while we are not handling those decisions, the default behaviour should be not take the risk of losing data.

@svenclemens
Copy link
Author

We have a solution were we delete files from server and do not delete the account.
But if we do so and remove all shares this shows the same effect like deleting the account.
The files remain on device.

See #129
I hope this is not policy, too.

@jochenwezel
Copy link

@davivel Well, when removing those files from owncloud server, the files should really be removed from the devices, too! Why? Because I want to delete files from owncloud to save space on my devices. Currently, the devices always recieve new files which I added, but they never get cleaned up when following the policy described above. This leads to full disk space step by step and as a normally skilled end-user (who doesn't know about Explorer apps and some local data directories in owncloud's app folder), I'm not able to free up the space any more and my disk is FULL and I need FREE SPACE...

@jochenwezel
Copy link

(For instance, some collegues share around 7 GB with me and many other users. They're often removing some old files and push new files to the collegues. Since I'll use the download-all/keep-up-to-date-on-local-device feature (in beta currently), my 16 GB Android device's disk space goes down and down and down...)

@davivel
Copy link
Contributor

davivel commented Apr 19, 2013

@jochenwezel , I will have to review the synchronization process. I thought we were removing local files when not found in the server any more.

I see the problems in the way accounts are deleted. We will have to check it.

@tobiasKaminsky
Copy link
Contributor

What about a dialog "Do you want to remove all files on device?"
Easy and simple ;)

@AndyScherzinger
Copy link
Member

I second @tobiasKaminsky suggestion, when deleting an account on the device the app should simply ask if the accounts data should be deleted on the device. :)

@jochenwezel
Copy link

The suggested dialog depends on the user - but this behaviour must be controlled by the organization/Company who "owns" the data and who has to ensure that some people can't access that data any more.

@tobiasKaminsky
Copy link
Contributor

@jochenwezel
I see your point but how can this be achieved?
The app then must verify that the account was deleted and that the option "force delete files on remote devices" is enabled and then delete the complete folder with all files?

@davivel Do you know how this is being handled by the desktop sync?

@jochenwezel
Copy link

@tobiasKaminsky yes, this would match approx. to the requirement. Only 1 additional point: "force delete files on remote devices" should be default setting (if you like, a General Switch for changing the Default to "disabled" could be provided in administration area)

@joeplus
Copy link

joeplus commented Sep 18, 2015

Just out of interest: How is it possible for an organization to administer the remote owncloud app and to ensure that when the user account is deleted (e.g. when the employee leaves the company) all files are deleted as well?

@jochenwezel
Copy link

  1. the Client app must still sync with the Server "with a valid Login" (for this, the Server must still allow (at least for a few weeks) to Login with the current Login data)
  2. after successful Login: Client app recieves delete notifications for all files and Folders
  3. cleanup done on 1 device - maybe other devices/sync Clients follow as soon as they sync next time

@joeplus
Copy link

joeplus commented Sep 18, 2015

Okay, that process makes sense. I didn't know that there is an admin functionality to send a "delete" command but I guess the admin would just manually delete the files associated with the user account?

@jochenwezel
Copy link

yes, the files on the Server have to be deleted as usual - just that the user account "keeps alive" as long as all known devices synced the many file deletions

@davivel
Copy link
Contributor

davivel commented Sep 18, 2015

The functionality that @jochenwezel talks about requires server side support. At this moment it's not available, as far as I know, and I don't know what are the plans regarding.

About the deletion controlled by the user, it's a different functionality totally on the device side. I'm not sure what was the original intention of @svenclemens for this issue (maybe you can clarify it).

In any case, both could be implemented, or just one of them.

Thinking in only the device side, deleting the files when the user removes the account from the OC app is easy to do as @tobiasKaminsky points.

The big deal here is deleting the files when the user removes the account from the 'Accounts' section in device settings (see 'Settings' > 'Accounts' > 'ownCloud' in your phone). Would be ideal to receive a broadcast Intent from the system when an account is removed, but there is not Intent like that.

Right now FileDownloader and FileUploader implement the interface http://developer.android.com/reference/android/accounts/OnAccountsUpdateListener.html to stop transfers of an account when it's removed. But this method requires an already live Context to register through the AccountManager (an open Activity, a running Service...). This means that if the app is completely off, there is no way to wake it up on an account removal from the device settings. At least no way we could find.

Anyway, removing from the OC app could be nice enough for most users.

@svenclemens
Copy link
Author

@davivel My original intention for this issue was that (shared) files on the device should get deleted after the related account was removed from the device.

But as @jochenwezel idea is very close to my intention I would see it as an addition to my issue.
I would like to see both of this features implemented in the app.

In a business or large-scaled environment it would be useful to have both, the possibility to remove files with account deletion from the server and also the guarantee the files will be removed if an user blocks the deletion by removing the account from the device.

@jancborchardt
Copy link
Member

This is not an enhancement but a bug. People expect device space to be freed up when they remove an account.

@jancborchardt
Copy link
Member

Same when uninstalling the app – all files remain, and this actually could be seen as a privacy issue because I expect my data to be gone.

cc @davivel @MTRichards @AndyScherzinger @tobiasKaminsky

@AndyScherzinger
Copy link
Member

Remving local downloaded files when removing the corresponding account seems to be manageable, see @tobiasKaminsky' comments. Doing this when removing the app is a bit more complicated afaik since the app isn't called before deletion do do some cleanup. So as long as the data is within the app's installation directory it should get removed by Android automatically. If the data resides somewhere else than the apps directory it basically will stay there. So if I am not mistaken this is by platform design. Only bug possible imho could be that the data in the app directory isn't removed....

@jancborchardt
Copy link
Member

So as long as the data is within the app's installation directory it should get removed by Android automatically. If the data resides somewhere else than the apps directory it basically will stay there.

By default, the data is in the installation directory, right? If ppl change it (e.g. using external storage) then it’s fine if it stays there on uninstall. But by default it should work.

@AndyScherzinger
Copy link
Member

Exactly, yes! Is there any occurrence of this not being the case with the latest releases?

@davivel
Copy link
Contributor

davivel commented Feb 24, 2016

By default, the data is in the installation directory, right?

Wrong. File contents always are in external storage from the very beginning of the app existence. That's why this is not a bug, but I'm not entering in a semantics discussion here.

Removing local downloaded files when removing the corresponding account seems to be manageable.

When the account is removed from the app, easy, and I wouldn't ask to the user. When the account is removed from 'Device settings' , not easy at all, and the most important reason to not having this done yet, probably.

So as long as the data is within the app's installation directory it should get removed by Android automatically. If the data resides somewhere else than the apps directory it basically will stay there. So if I am not mistaken this is by platform design.

That.

@jancborchardt
Copy link
Member

Sooo

File contents always are in external storage from the very beginning of the app existence.

is this the right way to do it? Seems not, or what am I hearing from @AndyScherzinger's comment?

@hodyroff
Copy link

@Peter-Prochaska
Nothing changed here with newer releases I assume?

@peterprochaska
Copy link

Hi @hodyroff, i don't know this case

davigonz pushed a commit that referenced this issue Feb 10, 2017
…of_login_name

Support to access display name of stored accounts
@davigonz davigonz added this to the backlog milestone Nov 30, 2017
@theScrabi
Copy link
Contributor

theScrabi commented Mar 19, 2018

Maybe we can add a alert dialog when deleting an account, in order to ask the user weather he wants his files to be deleted or not.

@michaelstingl
Copy link
Contributor

@theScrabi Okay, this would at least solve a part …

@theScrabi
Copy link
Contributor

Well but as @davivel states, it is complicated to remove the files if the account was deleted from android settings, and its impossible to delete them if the app gets removed.

So if I'm writing such a dialog it would only work if a user removes an account from the app it self. @michaelstingl @davigonz what are your thoughts about this?

@michaelstingl michaelstingl added the p3-medium Normal priority label Apr 10, 2019
@jesmrec jesmrec mentioned this issue Jun 11, 2020
5 tasks
@michaelstingl michaelstingl removed this from the backlog milestone Sep 30, 2020
@jesmrec jesmrec added this to the 2.19-current milestone Jul 23, 2021
@theScrabi theScrabi linked a pull request Jul 29, 2021 that will close this issue
1 task
@jesmrec jesmrec removed the deletion label Aug 11, 2021
@jesmrec
Copy link
Collaborator

jesmrec commented Aug 19, 2021

Done!

@jesmrec jesmrec removed the Sprint label Aug 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.