Migrating a folder ownership

Hello everyone,
I’d like to transfer files from a disebled user to another. I’ve found this article, however, I couldn’t understand it properly (I’m not a linux user).

I tried using that exemplo command
occ files:transfer-ownership user1 user2 and it returns that occ comand wasn’t found

I also read this other article but, I didn’t understand once again.

Could you explain what I have to do to transfer those files and shared files to another user?

I really appreciate.
Best Regards.

I guess i found the command (sudo -u www-data php /var/www/owncloud/occ files:transfer-ownership user1 user2), but it’s returning Unknown source user.
I’ve tried a couple of others users and still returning the same error.
Any ideia?

Hi liimaleandro,

The documentation you accessed is outdated, these are the current ones (note the version numbers in the links):

However, the command is correct.

sudo -u www-data php /var/www/owncloud/occ files:transfer-ownership user1 user2

I guess you replaced user1 and user2 with actual values. If not, replace them with the user IDs and try again.

Maybe the usernames you assume do not match with the real ones, you will get a list of all users with

sudo -u www-data php /var/www/owncloud/occ user:list

where the first entry in the list is the user name, followed by a colon and the display name



Thank you very much @cortho, I was trying my LDAP username, with my ID I could transfer all files properly.

1 Like