Again.... Ensure there is a file called ".ocdata" in the root of the data directory

I have had my ubuntu server up and running for nearly 3 years now and have not had many problems with it. I was attracted to the nextcloud platform because it seemed very simple and overall the experience has been delightful.
I received an error similar to the following about a year ago and for the life of me can not remember precisely what was done to fix it. I believe it had to do with some kind of snap update bug at that time.

"Your data directory is invalid
Ensure there is a file called “.ocdata” in the root of the data directory.
Cannot create “data” directory
This can usually be fixed by giving the webserver write access to the root directory. See

The funny thing is I have not done anything on my server in 2 days, and had NO issues with it at that time. Sync worked flawlessly and I was logged into the web UI at that time as well.

Any idea why this might be happening again unprompted, how to fix, and avoid again in the future? All of my coding projects are stored on this server and the sync’d folder locations are how I access all of my files. This is an incredible frustration…


Miraculously as soon as I hit post on this I did a reboot of the server through my ssh client and all of a sudden am back online. This is frustrating however because I still do not understand what causes this…