Nextcloud problem: missing .ocdata file [solution]

If an empty file brings your entire cloud to a standstill ...

Yesterday I connected a larger hard drive to my Raspberry Pi and transferred all old files to this hard drive. The plan was that I should be able to use Nextcloud just like that, except that I have four times as much memory available.

Unfortunately, when I put all the files on the new hard drive and started the web server, I could not access my cloud. I received the following error message:

Make sure that a file “.ocdata” exists in the root directory of the data directory.

The .ocdata file

The .ocdata file is just an empty file, which Nextcloud uses to verify the main directory of the media folder. If this file is deleted or is not set, Nextcloud loses its orientation and can not continue working.

The problem

I have copied all files from the old disk with the copy command from Linux to the new disk. System files were not copied. This refers to the files that start directly with the extension. These include .htaccess files.

The solution

Since this is an empty file, you can easily create it with the touch command. Simply enter the following into the console:

sudo touch /PFAD/ZU/DATEIABLAGE/.ocdata

You can save the empty file and transfer the owner rights to the web server. Then Nextcloud should run again without problems. The owner rights are given like this:

sudo chown www-data:www-data /PFAD/ZU/DATEIABLAGE/.ocdata

Topics

Bugfixing Cloud DIY Experience Linux Program Raspberry Pi technology Tips

Beitrag teilen

WhatsApp it