I think I messed up the permissions on the Icinga2 server. Now I’m not able to see any hosts or services on the web2.
I’m getting this error below:
/usr/local$ sudo icinga2 daemon -C
[2022-03-30 09:28:37 +0000] information/cli: Icinga application loader (version: r2.13.2-1)
[2022-03-30 09:28:37 +0000] information/cli: Loading configuration file(s).
[2022-03-30 09:28:37 +0000] critical/cli: Could not compile config files: Error: Function call ‘std::ifstream::open’ for file ‘/etc/icinga2/icinga2.conf’ failed with error code 13, ‘Permission denied’
(0) Compiling configuration file '/etc/icinga2/icinga2.conf'
what do the permissions look like? Normally, the directory /etc/icinga2 and its files are owned by nagios:nagios.
The backend worked after changing the user and group to Nagios. However, the Icingaweb2 seems not to be working.
Which is the default user and group for /etc/icingaweb2 path?
depends on your distribution and webserver used
apache2 webserver has the user
www-data on debian-based systems and
httpd on rpm-based systems
nginx on both IIRC
Group should be
icingaweb2, which is a group created during the initial setup of the webinterface
(same goes for the user/group owning/running icinga2, btw. which is
nagios for debian-based and
icinga for rpm-based systems)