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
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?
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.
i found something : maybe your mount point isnât accessible for www-data ?
sudo chown www-data:www-data /mnt/
or
sudo chown root:www-data /mnt/
sudo chown 770 /mnt/