Hi,
could someone tell me why this file
is not a valid json for Nextcloud occ config:import import on CentOS7?
sudo -u nginx php occ config:import {{ role_path }}/defaults/config.json
On Debian and Ubuntu the installation is working correct.
On CentOS7 the occ command doesnât import the json with the error message, that it isnât a valid json. Online json validators donât complain.
Also the return code of occ is ZERO. So ansible didnât report an error.
is this a current Centos 7 release or sth older? Nextcloud installed by a repository or manual?
Itâs this ansible playbook https://github.com/ReinerNippes/nextcloud13/tree/master on a AWS CentOS7 image from here https://wiki.centos.org/Cloud/AWS.
Nextcloud is from here: https://download.nextcloud.com/server/releases/latest.tar.bz2
On Ubuntu and Debian the same playbook is runing without problems. (At least the occ config:import part.)
Even this
{
"system": {
"memcache.local": "\\OC\\Memcache\\APCu",
"redis": {
"host": "\/var\/run\/redis\/redis.sock",
"port": "0",
"timeout": "0.0"
}
}
}
is not a valid json on CentOS7 ami-4bf3d731
The error message is
[centos@ip-172-31-71-17 ~]$ sudo -u nginx php /var/www/nextcloud/occ config:import config.json
The file must contain a valid json array
And finally. You canât reimport the config written with occ config:list
[centos@ip-172-31-71-17 ~]$ sudo -u nginx php /var/www/nextcloud/occ config:list > config.json
[centos@ip-172-31-71-17 ~]$ sudo -u nginx php /var/www/nextcloud/occ config:import config.json
The file must contain a valid json array
I found the problem.
On CentOS the HOME directories have 0700 rights (instead of 0755 on Ubuntu/Debian).
So the user nginx (sudo -u nginx) canât access any file in the HOME of centos.
Nevertheless the error handling could be improved. âFile not accesible. Return=-1â would be better.