[NC19] How to move user data, without hickups


I think I misunderstood it. Everything looks fine.


But how do i fix this problem then?

When i do “sudo -u www-data php occ files:scan --all”

It tells me that “Home storage of user Operations is not writeable”

It shows that error for every user i have created.

I think based on chat above, you have to create an empty .ocdata file in a /mnt/ncdata/.

The only user the that gives me an error when i do:

“sudo -u www-data php occ files:scan --all”

Is my own account.

It tells me storage for user ME not writeable
Make sure you’re running the scan command only as the user the web server runs as.

My 5 others users are not giving the error anymore.

I got delete any recreate that user, not that big of a deal.
Is there a way to check if everything is working a 100% and is secure now?

After i rebooted, i am getting the same error:

Make sure there is a .ocdata in data directory

How do i create a new .ocdata file? Because using the old one doesn’t same to work.

I have seen on this topic ( Ensure there is a file called ".ocdata" in the root of the data directory - #6 by sin-ms ) that you can fix this issue by switching mode of Background jobs for NC18.

Tried that but it didnt work :frowning:

have you enter this line After recreate .ocdata file in /mnt/ncdata ??
chown -R www-data:www-data /mnt/ncdata

have you use this command with -R ? :
chmod -R 750 /mnt/ncdata


So i should do it like this?

chown -R www-data:www-data /mnt/ncdata/.ocdata
chown -R www-data:www-data /mnt/ncdata
chmod -R 750 /mnt/ncdata
chown -R www-data:www-data /var/www/nextcloud

Yes i used -R before. Just not the /.ocdata part.

I don’t know if it’s useful in your case, but try this when you are in your nextcloud server directorie :
sudo -u www-data php occ maintenance:repair


This command tells me “Not a MySQL database -> nothing to do”.
My problem keeps being that when i remove the virtual drives that hold the ZFS pool (after moving the data to new virtual disc) i keep getting the error (after reboot):

Data folder is invalid.
Make sure .ocdata is present

Could you tell me how to create a new .ocdata file, maybe that is the solution because moving the old one doesn’t seem to work.

What i do get is when i do: find / -name .ocdata it tells me /mnt/ncdata/.ocdata
But when i use /mnt/ncdata/ls i don’t see the .ocdata file. Is that normal? Plus if the .ocdata file is in the right directory why does it break down when i remove the ZFS pool drives which are not doing anything anymore as for as i know.

And i have one more problem using ( i have used sudo -s command):

sudo -u www-data php occ files:scan --all

This command gives me an error with the users with admin rights (also when i create a new one).

The error is : Home storage for user NAME not writeable
Make sure you’re running the scan command only as the user the web server runs as

ok I find a reason for thit error: Home storage for user NAME not writeable
It appears when the user never logged in
i have the same error for user has never logged into their accounts

For .ocdata file , i looked at mine and it is empty


My admin users (2) have both logged in.
So you see your .ocdata file when you use “ls” to show the content of the directory?

.ocdata is a hiden file to see it (if he is here) you need to use : ls -a


Ahhh like that! When i use ls -a i do see the .ocdata file. When i open the file it is empty (like yours). I tried to write and save a word in the file. That is possible so it looks like the file is writeable right?

Could you compare my result (ls -la) with yours?

You are probably using a different data directory right? Because i am not seeing your .ocdata file. I think i have found the problem, i used this:

chown -R www-data:www-data /mnt/ncdata/.ocdata
chown -R www-data:www-data /mnt/ncdata
chmod -R 750 /mnt/ncdata
chown -R www-data:www-data /var/www/nextcloud

But the topic mentioned earlier about moving data directory says that you should use 770.

So i am gonna test the commands above with 770 instead of 750. Maybe this will solve my problem.

sorry, I give you the right screenshot

i used this command : sudo chmod -R 750 /data-path

i found something : maybe your mount point isn’t accessible for www-data ?

sudo chown www-data:www-data /mnt/
sudo chown root:www-data /mnt/
sudo chown 770 /mnt/