Securtiy scan warnings

I got the following errors after moving the nextcloud/data directory to an external SSD:

It was not possible to execute the cron job via CLI. The following technical errors have appeared:
• Your data directory is invalid Ensure there is a file called “.ocdata” in the root of the data directory.
• Your data directory is not writable Permissions can usually be fixed by giving the webserver write access to the root directory. See Installation wizard — Nextcloud latest Administration Manual latest documentation.

Here is a partial listing of the root of the data directory:

`-rw-r--r--  1 www-data www-data     0 Jul 30 11:37 .ocdata`

Here is a listing of the nextcloud directory:

`drwxr-x--- 5 www-data www-data 4096 Jul 30 11:37 data/`

As you can see, there is a file called .ocdata in the root of the data directory and the user/group for the data directory seems to be correct. However, I’m not sure if the permissions on the data directory are correct.

Also, the .ocdata file is simply a placeholder i.e. it’s an empty file with no configuration text/data.

Do you have any guidance on how to address these errors?

Can you post full path in config.php and on the file system. Test this from root. “sudo -s” (Ubuntu) or “su -” to change to root. Then.

su www-data
cd /mnt/to/your/data
touch testfile

Post errors.

I discovered the solution after poking around in the GUI.

In Settings > Administration > Basic Settings > Background Jobs there are 3 radio buttons. Mine was set on AJAX. I changed it to Cron then ran another scan… all of the warnings were gone.

Thanks for responding to my question.