[NC19] How to move user data, without hickups

,

@gas85,

I did
chown -R www-data:www-data /mnt/ncdata
chmod -R 750 /mnt/ncdata

And it looks like it’s working. I can login, create folders and upload files :slight_smile:

My next problem was that updating is was not working. I fixed that with:
chown -R www-data:www-data /var/www/nextcloud

My only problem now is that settings tell me “there are errors in your setup” (translated from Dutch). But it doesn’t tell me what kind of errors.

I think i found the error, when i do sudo -u www-data php occ files:scan --all
It tells me that Home storage of user BLABLA is not writeable

I tried chmod 750 /mnt/ncdata and chmod 770 /mnt/ncdata, 750/770 doesn’t solve the problem.

1 Like

Glad that you made it. Regarding last error that’s strange. Did you did run chmod also with -R fir ncdata folder?

@gas85,

What do you mean? I used this commands:

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

Which command should i try?

I think I misunderstood it. Everything looks fine.

@gas85,

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

@Mageunic,

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

@Mageunic,

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

@Mageunic,

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?

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

@Mageunic,

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?