-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Transfer Files to Another User When They Leave the Instance (or company) #19154
Comments
and also make sure this runs in a background job, not as a single PHP request which might time out... |
What about files shared with the user? What happens to that? |
I have a similar need so will add in here. @oparoz I don't think files shared with that person matter, it's more about making sure files owned or shared from that person are not lost and can be taken over by the new owner. I also think this issue is pretty similar to #13355 so they might end up being linked |
@godspeed20 - Well that user will have to write down the list of all shares and contact all people so that he can add the shares again. Not a great experience. |
@oparoz do you mean the person who is being deleted? Maybe my use case is different to the OP but my concern is solely around losing owned files, not files shared to the departing owner. If someone else takes over a project I'd like them to take over ownership too, so if the leaving person just leaves the new person has to get access to their files, download them all, get the old user removed, then create a new folder, re-share all the data, re-add all the people who had access to it before (minus the person who left) and then continue. That seems like a pretty bad process, worse than what you've mentioned. Ideally on a shared item basis (file or folder) the user or admin can simply migrate it to another user, keeping all shares of that particular shared item as is. This would only apply to items they own - anything shared to the departing owner are the responsibility of whoever shared that item to start with so that's a different person's issue to resolve (and you'd hope the group share would ideally take care of that anyway most of the time). does that make sense? Hmm actually now I think of it I see where you were coming from, think I'm thinking of a different use case, you're point stands for this particular case, sorry... |
Files shared from definitely matter, shared to... Can go either way, which is why I would add it and let the situation decide. Matt Richards
|
@schiesbn what do we need to take care of in case of encryption being enabled? Is is possible at all? @MTRichards can we exclude encryption from this operation? Worst case the admin has to decrypt the users files first, move them to the new user and encrypt them as the final step |
If we do this in two steps, first without encryption and then later with (if the recover key is enabled) I think that would be ok. Also it could take a very long time to make such a migration with encryption enabled, which is natural based on the situation. |
as discussed with @MTRichards For the scope of 9.0 we will implement this as an occ command ./occ files:transfer-ownership user1 user2 |
|
We should go for the user id - even if the LDAP guid is ugly - better be save then sorry. |
@MTRichards I'd create a target folder where all files will be moved in |
The command will be resumable 'just' because of files and folders are moved. |
@MTRichards what will happen to user mounts? I'd prefer to ignore them - objections? |
@DeepDiver1975 I think it was already agreed that there will be a target folder:
|
|
Depending on how the move is performance, if you do it with a Trashbin might be more tricky. Would probably also need a special folder in the target user's trashbin also with the generated folder name and move everything there. Note that trashbin can also have trashed versions... |
|
User mounts can be removed because they are not managed directly by ownCloud and won't disappear when a user is deleted (the file server may still have copies). Received shares can go away in version 1. The key is to make sure no files are lost . AND (update) to make sure that files that are shared by the person who is being removed are still shared so work can continue, and the files don't get lost. Plus, reshares are going to collapse into showing up as a share in the original list anyway. |
We could, conceivably, not move trashbin for now...the majority of the files in this use case should be in the main folders and versions so we could leave trash and just remove it. |
Agreed. I like this a lot, where the folder is the original owner's username or display name |
|
Implementation is done, closing. @DeepDiver1975 if there are follow ups / improvement ideas please raise separate tickets for them.
|
This is really great to see. Found it pretty useful, however, what if you wanted to migrate the data completely from one user to another overwriting the data of the second. An option to not delete the original files from the original user would be great too. Somehow I couldn't get the files in the transferred folder into the new user's main folder, overwriting default ownCloud data. Since this didn't work, I had to do it the hard way which was uploading the data manually from my computer. |
This is a very good Feature. One question: are contacts and calendar entries also copied ? I was always searching for a possibility to "rename" a user, this function seems to be able to do it, now. |
no - this is pure transfer of files. Transferring calendars and contacts could be done via a simple update of database entries. |
How can data be transfered to the new user's home folder overwriting default ownCloud data? What about just copying data rather than moving? |
Ticket for transferring versions: #29540 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Transfer Files after departure – As an admin, I want to be able to log in to ownCloud and transfer a user’s files from one account to another so that files (shared and not shared) are not lost when a user is deleted
Acceptance Criteria:
The text was updated successfully, but these errors were encountered: