Ability to change ownership of files (file move option)

Hi,
This is related to my previous post about the ability to disable users login, but new user rules here prevented me from posting both suggestions at the same time.
Regards,
Jason

This is also part of the on-ramp and off-ramp for users. When I disable a
user I should then be able to delegate that users’ files to another user.
Their incoming shares are unimportant.

Currently we have to either download, then re-upload all the files or hand
out multiple passwords and IDs to users. With a company with a high
turnover (we employ a lot of interns and temporary contractors) we have
trouble keeping tabs on what files are under which (ex) user.

The same mechanism should be able to be used for general housekeeping, e.g. to move
users files to match company policy.

Admin Flow:
Donate whole tree or single files or collections of files/trees from userA to userB
Any encrypted files are decrypted with the Admin key, then re-encrypted with
userB’s key.
For any conflicts, there should be a rename or skip option as, obviously overwriting a users
files would be dangerous.

2 Likes

occ files:transfer-ownership user1 user2

https://docs.nextcloud.com/server/12/admin_manual/configuration_files/file_sharing_configuration.html#transferring-files-to-another-user

Hi Thomas,
I did not know about the occ transfer-ownership, so thank you for the hint.
I would argue that the occ command only goes part of the way.
Part of the point of distributed file sharing is that users, not admin, are responsible for their files. A leaving user should be able to give away their files themselves rather than admin picking up the pieces. The user probably has a better idea who can continue their work than the IT person. In any case, the occ command moves all files from one user to another and only through console login, which no user has access. The user themself should be able to give away single files or different trees to different users occ can’t do this yet.

I would just expect that the user shared their files with edit rights with the relevant people taking over their work, and then when the original user was deactivated the second user still had access to the files.

If you’re really concerned about file ownership, maybe when a user is deactivated, any files they have shared with just one person become owned by that person. Not sure though about what happens when files are shared with zero or more than one people.

After testing the occ feature to transfer ownership I have found that it doesn’t really do a proper transfer. What happens is:

  1. Files are moved over to a new folder in the new owner files folder.
  2. All shared information is removed

Preferably it should move the existing files and folder in the same structure to the new owner, and change the shared links and permission to the new owner in the same way, so that nobody will lose the access to the files as before the transfer of ownership.

Currently the new user has to rename the folder(s) to reflect the old situation, and created new shares (with other users) and create new links (which will need to be send out again to the relevant parties)

1 Like

Then you should file a bug report.

This transfers all files from user1 to user2, and the shares and metadata info associated with those files (shares, tags, comments, etc).

please if you can tell where to run this command, i am new

in windows os
in macbook (appleOS)
or in linux.

if you can post some video will be helpful.