Opened 2 months ago

Closed 2 months ago

#16635 closed Bug/Something is broken (fixed)

Nextcloud folder ownership transfer not working

Reported by: Jamila Khan Owned by: JaimeV
Priority: Medium Component: Tech
Keywords: nextcloud Cc: maria@…, Jamie McClelland
Sensitive: no


Thanks for your help on #16629!

We are now attempting to put all the Highlander shared files into the highlander account. We just attempted to use the Nextcloud folder ownership transfer tool at to transfer ownership of the PAR folder from the maria.rincon user to the highlander user, but it didn't work. Is there a different way that we should be doing that?

Change History (8)

comment:1 Changed 2 months ago by Jamila Khan

Cc: maria@… added

comment:2 Changed 2 months ago by JaimeV

Cc: Jamie McClelland added
Owner: set to JaimeV
Status: newassigned

I'm not sure about that one Jamila. I will try initiating that same transfer as the admin user.

comment:3 Changed 2 months ago by JaimeV

No that wasn't possible. It might be possible to execute the transfer of files from the backend however the safest method would probably be to share with highlander user and then copy to new folder.

comment:4 Changed 2 months ago by Jamila Khan

Hi Jaime, the folder already has a large number of files in it and some subfolders shared with others by link. I'd like to not break those, but also not have a file version split. Is there any other way to transfer ownership?

I have a fair amount of nextcloud experience, what error happened when you tried to transfer ownership as the admin user? Did you do it through the UI or using the occ command line?

This command should do it:

sudo -u www-data php occ files:transfer-ownership --path="path_to_dir" <source-user> <destination-user>

comment:5 Changed 2 months ago by JaimeV

Through the admin gui interface I do not have access to the original user's folder to initiate the transfer. I am familiar with the occ files:transfer-ownership command and can try that for you.

comment:6 Changed 2 months ago by Jamila Khan

Thank you! That makes sense.

comment:7 Changed 2 months ago by JaimeV

So checking on original folder.

# du -sh /srv/nextcloud/mayfirst/data/maria.rincon/files/PAR
869M    /srv/nextcloud/mayfirst/data/maria.rincon/files/PAR

We have a wrapper script we run on host machine that executes the occ scripts from within the NC docker container itself and returns results but it is essentially the same command you provided above.

mf-nextcloud-occ-wrapper mayfirst files:transfer-ownership -vvv --path='PAR' maria.rincon highlander

After the transfer the folder 'PAR' now appears in enclosing folder 'transferred from Maria Rincon on 2021-08-18 17-35-29'

# du -sh /srv/nextcloud/mayfirst/data/highlander/files/transferred\ from\ Maria\ Rincon\ on\ 2021-08-18\ 17-35-29/PAR
869M    /srv/nextcloud/mayfirst/data/highlander/files/transferred from Maria Rincon on 2021-08-18 17-35-29/PAR

comment:8 Changed 2 months ago by Jamila Khan

Resolution: fixed
Status: assignedclosed

Excellent, thank you! I see it now! Perfect.

Please login to add comments to this ticket.

Note: See TracTickets for help on using tickets.