centreon/centreon-archived

(Debian) CLAPI - permission error

c0c0163 opened this issue · 1 comments

When you use clapi on debian, the permissions are not properly set for on the /var/cache folders

This cause a NOK on the WebUI

Generating files... NOK (Exception received : Not writeable directory '/var/cache/centreon/config/engine/1' [file: /usr/share/centreon/www/class/config-generate/backend.class.php] [line: 125] )
Aborted.
broker/1:
total 16
-rw-r--r-- 1 root root 2882 Sep 12 05:02 central-broker.json
-rw-r--r-- 1 root root 1740 Sep 12 05:02 central-module.json
-rw-r--r-- 1 root root 2162 Sep 12 05:02 central-rrd.json
-rw-r--r-- 1 root root  549 Sep 12 05:02 watchdog.json

engine/1:
total 100
-rw-rw---- 1 root root 4456 Sep 12 05:02 centengine.DEBUG
-rw-rw---- 1 root root 4156 Sep 12 05:02 centengine.cfg
-rw-rw---- 1 root root 1088 Sep 12 05:02 commands.cfg
-rw-rw---- 1 root root 1521 Sep 12 05:02 connectors.cfg
-rw-rw---- 1 root root 1088 Sep 12 05:02 contactgroups.cfg
-rw-rw---- 1 root root 1088 Sep 12 05:02 contacts.cfg
-rw-rw---- 1 root root 1088 Sep 12 05:02 dependencies.cfg
-rw-rw---- 1 root root 1088 Sep 12 05:02 escalations.cfg
-rw-rw---- 1 root root 1088 Sep 12 05:02 hostTemplates.cfg
-rw-rw---- 1 root root 1088 Sep 12 05:02 hostgroups.cfg
-rw-rw---- 1 root root 1088 Sep 12 05:02 hosts.cfg
-rw-rw---- 1 root root 1088 Sep 12 05:02 meta_commands.cfg
-rw-rw---- 1 root root 1088 Sep 12 05:02 meta_host.cfg
-rw-rw---- 1 root root 1088 Sep 12 05:02 meta_services.cfg
-rw-rw---- 1 root root 1088 Sep 12 05:02 meta_timeperiod.cfg
-rw-r--r-- 1 root root    2 Sep 12 05:02 plugins.json
-rw-rw---- 1 root root 1165 Sep 12 05:02 resource.cfg
-rw-rw---- 1 root root 1088 Sep 12 05:02 serviceTemplates.cfg
-rw-rw---- 1 root root 1088 Sep 12 05:02 servicegroups.cfg
-rw-rw---- 1 root root 1088 Sep 12 05:02 services.cfg
-rw-rw---- 1 root root 1088 Sep 12 05:02 severities.cfg
-rw-rw---- 1 root root 1088 Sep 12 05:02 tags.cfg
-rw-rw---- 1 root root 1088 Sep 12 05:02 timeperiods.cfg

Also in /etc/centreon-engine/

Moving files... NOK (Could not write to file 'plugins.json' for monitoring engine 'Central'. Please add writing permissions for the webserver's user)
Aborted.
-rw-rw-r-- 1 centreon-engine centreon-engine 4156 Sep 12 05:02 centengine.cfg
-rw-rw-r-- 1 centreon-engine centreon-engine 1088 Sep 12 05:02 commands.cfg
-rw-r--r-- 1 root            root            1521 Sep 12 05:02 connectors.cfg
-rw-r--r-- 1 root            root            1088 Sep 12 05:02 contactgroups.cfg
-rw-r--r-- 1 root            root            1088 Sep 12 05:02 contacts.cfg
-rw-r--r-- 1 root            root            1088 Sep 12 05:02 dependencies.cfg
-rw-r--r-- 1 root            root            1088 Sep 12 05:02 escalations.cfg
-rw-r--r-- 1 root            root            1088 Sep 12 05:02 hostTemplates.cfg
-rw-r--r-- 1 root            root            1088 Sep 12 05:02 hostgroups.cfg
-rw-r--r-- 1 root            root            1088 Sep 12 05:02 hosts.cfg
-rw-r--r-- 1 root            root            1088 Sep 12 05:02 meta_commands.cfg
-rw-r--r-- 1 root            root            1088 Sep 12 05:02 meta_host.cfg
-rw-r--r-- 1 root            root            1088 Sep 12 05:02 meta_services.cfg
-rw-r--r-- 1 root            root            1088 Sep 12 05:02 meta_timeperiod.cfg
-rw-r--r-- 1 root            root               2 Sep 12 05:02 plugins.json
-rw-rw-r-- 1 centreon-engine centreon-engine 1165 Sep 12 05:02 resource.cfg
-rw-r--r-- 1 root            root            1088 Sep 12 05:02 serviceTemplates.cfg
-rw-r--r-- 1 root            root            1088 Sep 12 05:02 servicegroups.cfg
-rw-r--r-- 1 root            root            1088 Sep 12 05:02 services.cfg
-rw-r--r-- 1 root            root            1088 Sep 12 05:02 severities.cfg
-rw-r--r-- 1 root            root            1088 Sep 12 05:02 tags.cfg
-rw-rw-r-- 1 centreon-engine centreon-engine 1088 Sep 12 05:02 timeperiods.cfg

Any update?