Unable to administer Users in app - possible bug?

Hi, Thanks for the continued support…

I’ve had a look at the code you sent me and I think there should be a user 1 and user 2 but they are both user 2?

cp -r /data/nextcloud/[user2]/files/ /data/nextcloud/[user2]/files/ 
  1. Tell Nextcloud that new files are on filesystem for a [user]:
snap run nextcloud.occ files:scan [user]
  1. Login to Nextcloud under [user] to check if there are files visible.

I have tried guessing to no avail…

cp -r /data/nextcloud/bob/files/ /data/nextcloud/dave/files/

I guessed the above for example where copying files from bob and pasting them in dave?
I then ran

snap run nextcloud.occ files:scan dave

and finally logged in to dave, but no files transferred.

Not sure at this time why this isn’t working or if there are some prerequisites that I am not aware of?

one other quick question… once we/ I get this working will I be able to move all the files from my old dormant user account to the current account that is attached to my email etc that I have access to when I log into nextcloud?

right fixed the original post.

You can check if files are there for bob by running this:

ls -la /data/nextcloud/bob/files

And for dave:

ls -la /data/nextcloud/dave/files

Do you see any files under dave with the above command but still nothing on Nextcloud for dave?

ok one more thing added to the list, after the copy you need to fix permissions of the copied files:

chown -R nextcloud. /data/nextcloud/[user2]

Awesome… So that all worked! All users have been reinstated and data recovered to the relevant accounts. Thank you!

One little nugget of info for anyone reading this in the future is that once you’ve created your new user account, you will need to log into that account in nextcloud for it to create the accounts folder… Once that’s been done, log out and then follow the ssh code instructions.

So, next thought turns to housekeeping… I now have old user data dormant and taking up space on the hard drive as we’ve copied data from the old accounts to the new accounts causing a doubling up on the data for each account. For instance just one of the folders in my data folder is 164Gb… So as you can imagine having that much used but not accessible date feels like a bit of a waste of space?

Is there a way of cleaning up the old users so just leaving active users… I’m guessing each redundant data file will need to be removed individually… But how to do this?

Sure but be very careful with this command as it will remove more if you type it incorrectly or hit enter before typing the path!!!

Also look for spaces anywhere in the path as it will just split one paths into two and try to remove them individually.

cd /data/nextcloud
rm -rf [old_user]

Thank you so much @boris for your help and understanding. :+1: You’ve helped me and hopefully others to follow, to sort out accounts, migrate data to the new accounts and also clean up and remove the old accounts and duplicate data. That is, once I’d checked the data on the new account multiple times! :rofl: