[/details]
Nextcloud version (eg, 29.0.5): 29.0.10
Operating system and version (eg, Ubuntu 24.04): Linux 4.4.302+ #64570 SMP Tue Jun 13 21:40:17 CST 2023 x86_64 GNU/Linux synology_apollolake_718+
Apache or nginx version (eg, Apache 2.4.25): 2.4.58
PHP version (eg, 8.3): 8.2
The issue you are facing:
When moveing the datadirectory from the default location within the nextcloud-root directory to another location, the new location and .ocdata is not found. As long as the datadirectoy is in the default location, nextcloud runs normally.
config.php and oc_storage in the database are modified. The new folder has proper access-rights and ownership.
Is this the first time you’ve seen this error? (Y/N): Y
Steps to replicate it:
- I did a complete new installation of the nextcloud server (it’s my testsystem)
- I changed datadirectory in config.php and changed the oc_storages entry in the database
- I copied the data-folder to the new location, made chmod 777 and chown http:http (my webserver-user)
- Open nextcloud in browser and got the error in the web-interface, no entry in the nextcloud.log is found however
The output of your Nextcloud log in Admin > Logging:
can't see any error related to this issue - logfile is empty
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
(Following config.php is from my testsystem, which is whithout any additional app, just the plain nextcloud server.)
<?php
$CONFIG = array (
'passwordsalt' => 'xxx',
'secret' => 'xxx',
'trusted_domains' =>
array (
0 => 'localhost',
1 => 'mydomain.de',
),
'datadirectory' => '/volume1/nextcloud_datatest2',
'dbtype' => 'mysql',
'version' => '29.0.7.1',
'overwrite.cli.url' => 'http://localhost',
'dbname' => 'xxx',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'oc_xxx',
'dbpassword' => 'xxx',
'installed' => true,
'instanceid' => 'xxx',
'maintenance' => false,
'theme' => '',
'loglevel' => 2,
);
The output of your Apache/nginx/system log in /var/log/____
:
PASTE HERE
Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.
logfile nextcloud.log in new datadirectoy exists, but is empty
datadirectory:
xxx@xxx:~$ ll /volume1/nextcloud_datatest2
total 4
drwxrwx— 1 http http 128 Sep 27 20:20 .
drwxr-xr-x 1 root root 1414 Sep 26 22:02 …
drwxrwxrwx 1 http http 10 Sep 27 20:19 xxx
drwxrwxrwx 1 http http 38 Sep 27 22:35 appdata_xxx
-rwxrwxrwx 1 http http 542 Sep 27 20:19 .htaccess
-rwxrwxrwx 1 http http 0 Sep 27 20:19 index.html
-rwxrwxrwx 1 http http 0 Sep 27 20:20 nextcloud.log
-rwxrwxrwx 1 http http 0 Sep 27 20:19 .ocdata
xxx@xxx:~$
database oc_storages:
local::/volume1/nextcloud_datatest2/
Additional information:
I tried multiple times with new installation of my testsystem, with the web-installer but also command-line installation. It’s no difference. As long as the datadirectory is in the default location (root-nextcloud/data) the system runs fine. I run nextcloud since years and never had such difficulties to move the datadirectory. I’m somehow lost after reading all the posts in the community-support about this topic and have no idea anymore. Maybe just a small thing I do not recognize at the moment. Any help is welcome.