Hello,
My Nextcloud install is quite new and I read here that I should have my data directory outside of the web root.
Hence I moved /var/www/nextcloud/data/
to /home/username/nextcloud/data
and changed /var/www/nextcloud/config/config.php
to:
$CONFIG = array (
'trusted_domains' =>
array (
0 => 'localhost',
1 => 'cloud.example.com',
),
'datadirectory' => '/home/username/nextcloud/data',
'dbtype' => 'mysql',
'version' => '22.1.1.2',
'overwrite.cli.url' => 'http://localhost',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'oc_admin',
'installed' => true,
'instanceid' => 'ocagznenjk6c',
'maintenance' => false,
);
Note that my files are accessible from the Nextcloud web interface; it seems that my change largely worked.
However, in my Nextcloud web interface, in “Administration → Overview → Security & setup warnings” I have a message in red that reads (translated):
It was not possible to execute the cron job via CLI. The following technical errors have appeared:
Your directory is not valid; make sure your data directory contains a file named ".ocdata" at its root.
Here is what my directories look like:
$ ls -l /home/username
drwxr-xr-x 3 www-data www-data 4096 Sep 16 08:11 nextcloud
$ ls -l /home/username/nextcloud
drwxrwx--- 5 www-data www-data 4096 Sep 16 08:10 data
$ ls -l /home/username/nextcloud/data
drwxr-xr-x 4 www-data www-data 4096 Sep 15 14:46 admin
drwxr-xr-x 10 www-data www-data 4096 Sep 16 08:00 appdata_hashdata
drwxr-xr-x 5 www-data www-data 4096 Sep 16 08:09 example
-rw-r--r-- 1 www-data www-data 542 Sep 14 12:13 .htaccess
-rw-r--r-- 1 www-data www-data 0 Sep 14 12:13 index.html
-rw-r----- 1 www-data www-data 36847 Sep 15 19:50 nextcloud.log
-rw-r--r-- 1 www-data www-data 0 Sep 14 12:13 .ocdata
As you can see the data directory does indeed contain the .ocdata
file.
Does anyone have an idea what is going on?
Thanks in advance for your help.
Nextcloud version: 22.1.1.2
Operating system and version: Debian 11
Apache or nginx version: nginx 1.18.0
PHP version: 7.4