I installed Icingaweb2 2.8.0 from Debian Icinga2 APT repository but I cannot get it working because of this error
Jun 27 14:04:43 cop icingaweb2[27351]: Icinga\Exception\IcingaException in /usr/share/php/Icinga/Application/ApplicationBootstrap.php:456 with message: Cannot load enabled modules. An exception was thrown: <- Icinga\Exception\NotReadableError in /usr/share/php/Icinga/Application/Modules/Manager.php:122 with message: Cannot read enabled modules. Config directory "/etc/icingaweb2" is not readable
Icingaweb2 is configured with Nginx which is running as www-data
user, which belongs to the icingaweb2
group which can read and write into the /etc/icingaweb2
directory:
root@cop:/etc/icingaweb2# ps aux|grep nginx
root 486 0.0 0.0 11320 1008 ? Ss 14:01 0:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
www-data 487 0.0 0.0 11324 5628 ? S 14:01 0:00 nginx: worker process
root 1067 0.0 0.0 6076 884 pts/0 S+ 14:07 0:00 grep nginx
root@cop:/etc/icingaweb2# groups www-data
www-data : www-data icingaweb2
root@cop:/etc/icingaweb2# ls -la /etc/icingaweb2
total 44
drwxrws--- 4 root icingaweb2 4096 Jun 27 14:02 .
drwxr-xr-x 102 root root 4096 Jun 27 14:00 ..
-rw-rw---- 1 www-data icingaweb2 51 Jun 27 13:28 authentication.ini
-rw-r----- 1 root icingaweb2 54 Jun 27 13:03 authentication.ini~
-rw-rw---- 1 www-data icingaweb2 212 Jun 27 13:44 config.ini
-rw-r----- 1 www-data icingaweb2 212 Jun 27 13:03 config.ini~
drwxr-s--- 2 www-data icingaweb2 4096 Jun 27 13:03 enabledModules
-rw-rw---- 1 www-data icingaweb2 54 Jun 27 13:03 groups.ini
drwxrws--- 4 root icingaweb2 4096 Jun 27 13:03 modules
-rw-rw---- 1 www-data icingaweb2 328 Jun 27 13:03 resources.ini
-rw-rw---- 1 www-data icingaweb2 77 Jun 27 13:03 roles.ini
If I try to read files from /etc/icingaweb2
with the www-data
user it works:
root@cop:/etc/icingaweb2# sudo -u www-data bash
www-data@cop:/etc/icingaweb2$ whoami
www-data
www-data@cop:/etc/icingaweb2$ ls -la /etc/icingaweb2
total 44
drwxrws--- 4 root icingaweb2 4096 Jun 27 14:02 .
drwxr-xr-x 102 root root 4096 Jun 27 14:00 ..
-rw-rw---- 1 www-data icingaweb2 51 Jun 27 13:28 authentication.ini
-rw-r----- 1 root icingaweb2 54 Jun 27 13:03 authentication.ini~
-rw-rw---- 1 www-data icingaweb2 212 Jun 27 13:44 config.ini
-rw-r----- 1 www-data icingaweb2 212 Jun 27 13:03 config.ini~
drwxr-s--- 2 www-data icingaweb2 4096 Jun 27 13:03 enabledModules
-rw-rw---- 1 www-data icingaweb2 54 Jun 27 13:03 groups.ini
drwxrws--- 4 root icingaweb2 4096 Jun 27 13:03 modules
-rw-rw---- 1 www-data icingaweb2 328 Jun 27 13:03 resources.ini
-rw-rw---- 1 www-data icingaweb2 77 Jun 27 13:03 roles.ini
www-data@cop:/etc/icingaweb2$ cat /etc/icingaweb2/authentication.ini
[auth_db]
backend = "db"
resource = "icingaweb_db"
So I really cannot understand what’s going on!
Could you help me please?
Thanks!