What type of hardware are you using: Old laptop or computer
What YunoHost version are you running: 12.0.9
What app is this about: Nextcloud
Describe your issue
Yesterday,
I update Nextcloud via admin GUI. My fault : i didn’t look if it goes at end.
From 29.0.9~ynh1 to 30.0.4.
This morning ; i see Nextcloud is broken, i go to home page :
Votre répertoire des données n’est pas valide.
Assurez-vous que le répertoire de données contient un fichier “.ocdata” à sa racine.
(english translation via deepl)
Your data directory is invalid.
Make sure your data directory contains an “.ocdata” file at its root.
Then I try to update again via CLI and broken,
Paste is here : https://paste.yunohost.org/raw/ucabijeyod
Some checking :
/var/www/nextcloud/config/config.php
#cat /var/www/nextcloud/config/config.php
<?php
$CONFIG = array (
'instanceid' => 'XXXXX',
'passwordsalt' => 'XXXXXXXXXXXx',
'secret' => 'XXXXXXXXXXXXXXXXXXXXXX',
'trusted_domains' =>
array (
0 => 'localhost',
1 => 'maison.domain.example.net',
),
'datadirectory' => '/home/yunohost.app/nextcloud/data',
'overwrite.cli.url' => 'https://maison.domain.example.net/owncloud',
'dbtype' => 'mysql',
'version' => '29.0.9.2',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbtableprefix' => 'oc_',
'dbuser' => 'nextcloud',
'dbpassword' => 'XXXXXXXXXXXXXXXXXXX',
'installed' => true,
'memcache.local' => '\\OC\\Memcache\\APCu',
'maintenance' => false,
'loglevel' => 2,
'trashbin_retention_obligation' => 'auto',
'theme' => '',
'updatechecker' => false,
'integrity.check.disabled' => true,
'logout_url' => 'https://maison.domain.example.net
/yunohost/sso/?action=logout&r=XXXXXXXXXXXXXXXXXX',
'htaccess.RewriteBase' => '/owncloud',
'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
'ldapIgnoreNamingRules' => false,
'filelocking.enabled' => true,
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => 'localhost',
'port' => '6379',
'timeout' => '0.0',
'password' => '',
),
'hashing_default_password' => true,
'localstorage.allowsymlinks' => true,
'simpleSignUpLink.shown' => false,
'mysql.utf8mb4' => true,
'app_install_overwrite' =>
array (
0 => 'contacts',
),
'mail_from_address' => 'nextcloud',
'mail_smtpmode' => 'smtp',
'mail_sendmailmode' => 'smtp',
'mail_domain' => 'maison.domain.example.net',
'mail_smtphost' => 'localhost',
'mail_smtpauth' => 1,
'mail_smtpname' => 'nextcloud',
'mail_smtppassword' => 'XXXXXXXXXXXXX',
'mail_smtpport' => '25',
'mail_smtpstreamoptions' =>
array (
'ssl' =>
array (
'allow_self_signed' => true,
'verify_peer' => false,
'verify_peer_name' => false,
),
),
'logfile' => '/var/log/nextcloud/nextcloud.log',
'maintenance_window_start' => 1,
'trusted_proxies' =>
array (
0 => '127.0.0.1',
1 => '::1',
),
);
root@maison:/# ls -la /home/yunohost.app/nextcloud/data/
total 100
drwxr-x--- 17 nextcloud nextcloud 4096 Dec 19 16:43 .
drwxr-x--- 9 nextcloud nextcloud 4096 Dec 19 16:39 ..
drwxr-x--- 3 nextcloud nextcloud 4096 Jul 27 2023 admin_2329
drwxr-x--- 14 nextcloud nextcloud 4096 Jul 27 2023 appdata_ocxsmc2kyo1p
drwxr-x--- 3 nextcloud nextcloud 4096 Dec 26 2021 backupbelar
drwxr-x--- 2 nextcloud nextcloud 4096 Dec 9 2015 cops
drwxr-x--- 9 nextcloud nextcloud 4096 Jul 26 2019 denis
drwxr-x--- 2 nextcloud nextcloud 4096 Jun 27 08:33 files_external
drwxr-x--- 8 nextcloud nextcloud 4096 Jul 25 2019 gatien
drwxr-x--- 7 nextcloud nextcloud 4096 Mar 29 2019 hector
-rw-r----- 1 nextcloud nextcloud 542 Dec 19 16:24 .htaccess
-rw-r----- 1 nextcloud nextcloud 145 Aug 1 2016 htaccesstest.txt
-rw-r----- 1 nextcloud nextcloud 0 Dec 19 16:24 index.html
drwxr-x--- 2 nextcloud nextcloud 4096 May 29 2015 .locks
drwxr-x--- 9 nextcloud nextcloud 4096 Aug 25 2021 lolotte
drwxr-x--- 9 nextcloud nextcloud 4096 Aug 27 2017 manou
-rw-r----- 1 nextcloud nextcloud 120 Apr 11 2016 mount.json
-rw-r----- 1 nextcloud nextcloud 52 Dec 19 16:24 .ncdata
drwxr-x--- 4 nextcloud nextcloud 4096 Nov 7 2015 news
-rw-r----- 1 nextcloud nextcloud 12112 Dec 19 17:07 nextcloud.log
-rw-r----- 1 nextcloud nextcloud 1 Dec 21 11:23 owncloud.log
drwxr-x--- 2 nextcloud nextcloud 4096 Aug 27 2020 svcjitsifocus
drwxr-x--- 2 nextcloud nextcloud 4096 May 26 2015 test
drwxr-x--- 2 nextcloud nextcloud 4096 Jun 1 2015 updater_backup
Check if oi can create a file as nextcloud user : OK
# sudo -u nextcloud touch /home/yunohost.app/nextcloud/data/test2
root@maison:/# ls -la /home/yunohost.app/nextcloud/data/
total 100
drwxrwx--- 17 nextcloud nextcloud 4096 Dec 21 11:37 .
drwxr-x--- 9 nextcloud nextcloud 4096 Dec 19 16:39 ..
drwxrwxr-x 3 nextcloud nextcloud 4096 Jul 27 2023 admin_2329
drwxrwxr-x 14 nextcloud nextcloud 4096 Jul 27 2023 appdata_ocxsmc2kyo1p
drwxrwxr-x 3 nextcloud nextcloud 4096 Dec 26 2021 backupbelar
drwxrwxr-x 2 nextcloud nextcloud 4096 Dec 9 2015 cops
drwxrwxr-x 9 nextcloud nextcloud 4096 Jul 26 2019 denis
drwxrwxr-x 2 nextcloud nextcloud 4096 Jun 27 08:33 files_external
drwxrwxr-x 8 nextcloud nextcloud 4096 Jul 25 2019 gatien
drwxrwxr-x 7 nextcloud nextcloud 4096 Mar 29 2019 hector
-rwxrwxr-x 1 nextcloud nextcloud 542 Dec 19 16:24 .htaccess
-rwxrwxr-x 1 nextcloud nextcloud 145 Aug 1 2016 htaccesstest.txt
-rwxrwxr-x 1 nextcloud nextcloud 0 Dec 19 16:24 index.html
drwxrwxr-x 2 nextcloud nextcloud 4096 May 29 2015 .locks
drwxrwxr-x 9 nextcloud nextcloud 4096 Aug 25 2021 lolotte
drwxrwxr-x 9 nextcloud nextcloud 4096 Aug 27 2017 manou
-rwxrwxr-x 1 nextcloud nextcloud 120 Apr 11 2016 mount.json
-rwxrwxr-x 1 nextcloud nextcloud 52 Dec 19 16:24 .ncdata
drwxrwxr-x 4 nextcloud nextcloud 4096 Nov 7 2015 news
-rwxrwxr-x 1 nextcloud nextcloud 12112 Dec 19 17:07 nextcloud.log
-rwxrwxr-x 1 nextcloud nextcloud 1 Dec 21 11:23 owncloud.log
drwxrwxr-x 2 nextcloud nextcloud 4096 Aug 27 2020 svcjitsifocus
drwxrwxr-x 2 nextcloud nextcloud 4096 May 26 2015 test
-rw-r--r-- 1 nextcloud nextcloud 0 Dec 21 11:37 test2
drwxrwxr-x 2 nextcloud nextcloud 4096 Jun 1 2015 updater_backup
Some test (hacking PHP file)
# sudo -u nextcloud env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin php8.2 --define apc.enable_cli=1 occ
Your data directory is invalid.
Ensure there is a file called ".ocdata" in the root of the data directory.
An unhandled exception has been thrown:
Exception: Environment not properly prepared. in /var/www/nextcloud/lib/private/Console/Application.php:167
Stack trace:
#0 /var/www/nextcloud/console.php(101): OC\Console\Application->loadCommands()
#1 /var/www/nextcloud/occ(11): require_once('...')
- data dir is :
/home/yunohost.app/nextcloud/data