# Failed to set up Icinga Web 2 - Check the permissions for the enabledModules directory

**URL:** <https://community.icinga.com/t/failed-to-set-up-icinga-web-2-check-the-permissions-for-the-enabledmodules-directory/1401>\
**Category:** Icinga Web\
**Created:** [June 5, 2019, 6:21pm UTC](https://community.icinga.com/t/failed-to-set-up-icinga-web-2-check-the-permissions-for-the-enabledmodules-directory/1401 "2019-06-05T18:21:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![daniel](https://community.icinga.com/letter_avatar_proxy/v4/letter/d/3ec8ea/32.png) [@daniel](https://community.icinga.com/u/daniel)\
**Post date:** [June 5, 2019, 6:21pm UTC](https://community.icinga.com/t/failed-to-set-up-icinga-web-2-check-the-permissions-for-the-enabledmodules-directory/1401/1 "2019-06-05T18:21:27Z")

</div>

I’m installing Icinga2 with Icinga Web2 from using the Icinga2/Icinga Web 2 repository, and also I’ve installed/configured the Director from GIT repository on a Red Hat 7.6 prior to executing the web setup.

But the web setup is failing with the following error:

 ![icinga2_setup_error](https://community.icinga.com/uploads/default/original/1X/2869e5a0348cab0e271c724d50b4694e73b831f9.png)

> _Sorry! Failed to set up Icinga Web 2 successfully._
> 
> _Successfully connected to existing database “icingaweb2\_db”…_  
> _Database schema already exists…_  
> _Login “icingaweb2” already exists…_  
> _Required privileges were already granted to login “icingaweb2”._  
> _The database has been fully set up!_
> 
> _General configuration has been successfully written to: /etc/icingaweb2/config.ini_
> 
> _Authentication configuration has been successfully written to: /etc/icingaweb2/authentication.ini_  
> _Account “icinga\_admin” has been successfully defined as initial administrator._
> 
> _User Group Backend configuration has been successfully written to: /etc/icingaweb2/groups.ini_
> 
> _Resource configuration has been successfully written to: /etc/icingaweb2/resources.ini_
> 
> _Monitoring backend configuration has been successfully written to: /etc/icingaweb2/modules/monitoring/backends.ini_  
> _Resource configuration has been successfully updated: /etc/icingaweb2/resources.ini_
> 
> _Command transport configuration has been successfully created: /etc/icingaweb2/modules/monitoring/commandtransports.ini_
> 
> _Monitoring security configuration has been successfully created: /etc/icingaweb2/modules/monitoring/config.ini_
> 
> _Module “director” could not be enabled. An error occured:_  
> _ERROR: Icinga\Exception\SystemPermissionException in /usr/share/php/Icinga/Application/Modules/Manager.php:275 with message: Cannot enable module “director”. Check the permissions for the enabledModules directory: /etc/icingaweb2/enabledModules_  
> _Module “doc” could not be enabled. An error occured:_  
> _ERROR: Icinga\Exception\SystemPermissionException in /usr/share/php/Icinga/Application/Modules/Manager.php:275 with message: Cannot enable module “doc”. Check the permissions for the enabledModules directory: /etc/icingaweb2/enabledModules_  
> _Module “monitoring” could not be enabled. An error occured:_  
> _ERROR: Icinga\Exception\SystemPermissionException in /usr/share/php/Icinga/Application/Modules/Manager.php:275 with message: Cannot enable module “monitoring”. Check the permissions for the enabledModules directory: /etc/icingaweb2/enabledModules_

Here is some info about the version I 've installed:

> [root@icinga2 ~]# icinga2 --version  
> icinga2 - The Icinga 2 network monitoring daemon (version: r2.10.5-1)
> 
> Copyright (c) 2012-2019 Icinga GmbH ([https://icinga.com/](https://icinga.com/))  
> License GPLv2+: GNU GPL version 2 or later [http://gnu.org/licenses/gpl2.html](http://gnu.org/licenses/gpl2.html)  
> This is free software: you are free to change and redistribute it.  
> There is NO WARRANTY, to the extent permitted by law.
> 
> System information:  
> Platform: Red Hat Enterprise Linux Server  
> Platform version: 7.6 (Maipo)  
> Kernel: Linux  
> Kernel version: 3.10.0-957.el7.x86\_64  
> Architecture: x86\_64
> 
> Build information:  
> Compiler: GNU 4.8.5  
> Build host: afcad697467e
> 
> Application information:
> 
> General paths:  
> Config directory: /etc/icinga2  
> Data directory: /var/lib/icinga2  
> Log directory: /var/log/icinga2  
> Cache directory: /var/cache/icinga2  
> Spool directory: /var/spool/icinga2  
> Run directory: /run/icinga2
> 
> Old paths (deprecated):  
> Installation root: /usr  
> Sysconf directory: /etc  
> Run directory (base): /run  
> Local state directory: /var
> 
> Internal paths:  
> Package data directory: /usr/share/icinga2  
> State path: /var/lib/icinga2/icinga2.state  
> Modified attributes path: /var/lib/icinga2/modified-attributes.conf  
> Objects path: /var/cache/icinga2/icinga2.debug  
> Vars path: /var/cache/icinga2/icinga2.vars  
> PID path: /run/icinga2/icinga2.pid  
> [root@icinga2 ~]#

---

<div class="post-metadata">

**Author:** ![daniel](https://community.icinga.com/letter_avatar_proxy/v4/letter/d/3ec8ea/32.png) [@daniel](https://community.icinga.com/u/daniel)\
**Post date:** [June 6, 2019, 12:49am UTC](https://community.icinga.com/t/failed-to-set-up-icinga-web-2-check-the-permissions-for-the-enabledmodules-directory/1401/2 "2019-06-06T00:49:10Z")

</div>

I fixed it!

For some reason, the permissions for the enabledModules directory (/etc/icingaweb2/enabledModules) were pointing to a symbolic link with a different set of permissions.

I fixed it by executing:

> $ chown -R apache /etc/icingaweb2/
