Hello folks,
I have my nextcloud 12 up and running within my VM using nginx.
It was working well but i wanted to move my data to my NAS.
I created a network sharing, it is working well so after that without any additional thinkin i tried to move my data folder to my shared folder ( /mnt/NextCloud/ ) after that my Nextcloud doesn’t work anymore.
I have run the script to fix permission. ( https://docs.nextcloud.com/server/9/admin_manual/installation/installation_wizard.html#strong-perms-label )
I have manually applied the right permissions to my data folder (using the instruction of the previous link).
Here is my config.php :
<?php
$CONFIG = array (
'instanceid' => 'xxxxx',
'passwordsalt' => 'xxxxx',
'secret' => 'xxxxxxx',
'trusted_domains' =>
array (
0 => '192.168.2.16',
1 => 'xxxxx',
),
'datadirectory' => '/mnt/NextCloud/nextcloud-data/',
'overwrite.cli.url' => 'http://192.168.2.16',
'dbtype' => 'mysql',
'version' => '12.0.0.29',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'nextcloud',
'dbpassword' => 'xxxxx',
'installed' => true,
);
My data folder :
root@nuci5:/var/www/nextcloud# ls -la /mnt/NextCloud/nextcloud-data/
total 76
drwxr-x--- 5 www-data www-data 4096 May 28 22:20 .
drwxrwxrwx 4 www-data root 4096 Jun 3 22:00 ..
drwxr-x--- 7 www-data www-data 4096 May 29 23:04 toto
drwxr-x--- 10 www-data www-data 4096 Jun 1 17:10 appdata_xxxxxxxxx
drwxr-x--- 2 www-data www-data 4096 May 28 22:20 files_external
-rw-r--r-- 1 root www-data 324 May 28 22:10 .htaccess
-rw-r----- 1 www-data www-data 0 May 28 22:10 index.html
-rw-r----- 1 www-data www-data 48059 Jun 3 21:23 nextcloud.log
-rw-r----- 1 www-data www-data 0 May 28 22:10 .ocdata
And the error that i have in error.log :
PHP message: {"reqId":"xxxxxx","level":3,"time":"2017-06-03T20:42:50+00:00","remoteAddr":"192.168.2.6","user":"--","app":"PHP","method":"GET","url":"\/status.php","message":"fileperms(): stat failed for \/mnt\/NextCloud\/nextcloud-data\/\/nextcloud.log at \/var\/www\/nextcloud\/lib\/private\/Log\/File.php#122","userAgent":"Mozilla\/5.0 (Windows) mirall\/2.3.1 (build 8) (Nextcloud)","version":"12.0.0.29"}
PHP message: {"reqId":"xxxxxx","level":4,"time":"2017-06-03T20:42:50+00:00","remoteAddr":"192.168.2.6","user":"--","app":"remote","method":"GET","url":"\/status.php","message":"$absolutePath must be relative to \"files\"","userAgent":"Mozilla\/5.0 (Windows) mirall\/2.3.1 (build 8) (Nextcloud)","version":"12.0.0.29"}
PHP message: PHP Warning: fileperms(): stat failed for /mnt/NextCloud/nextcloud-data//nextcloud.log in /var/www/nextcloud
I don’t know how i can fix it.
After some reading it seems to be a very bad thing to simply move the data directory using a simple mv and editing the config.php but now it’s too late
Do you know how i can fix this ?
Thanks.