You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2025-03-11 16:56:57

robi
Member
From: Zürich
Registered: 2025-02-06
Posts: 13

Write access denied for configuration files

Hi Everyone

After my unsuccessful installation on an RHEL Standard server from my company, I have a blank RHEL 9.5 installation used to add GLPI to it.

OS: RHEL9.5 (minimal installation)
Apache: Apache/2.4.62
PHP:  8.3.17
GLPI 10.0.18

Everything worked fine until I started the installation. I get this error:

Write access denied for configuration files
A temporary write access to the following files is required: `/var/www/html/glpi/config/config_db.php`, `/var/www/html/glpi/config/glpicrypt.key`.
Write access to these files can be removed once the operation is finished.

As I can see, the files can not be created as expected.
I checked my permissions, and it looks okay to me.

drwxr-xr-x. 24 apache apache 4.0K Feb 12 11:41 .
drwxr-xr-x.  3 root   root     18 Mar 11 09:30 ..
drwxr-xr-x.  2 apache apache 8.0K Feb 12 11:39 ajax
-rw-r--r--.  1 apache apache  63K Feb 12 11:39 apirest.md
-rw-r--r--.  1 apache apache 1.6K Feb 12 11:39 apirest.php
-rw-r--r--.  1 apache apache 1.6K Feb 12 11:39 apixmlrpc.php
drwxr-xr-x.  2 apache apache   21 Feb 12 11:39 bin
-rw-r--r--.  1 apache apache 1.5K Feb 12 11:39 caldav.php
-rw-r--r--.  1 apache apache  45K Feb 12 11:39 CHANGELOG.md
drwxr-xr-x.  2 apache apache   65 Mar 11 07:59 config
-rw-r--r--.  1 apache apache 2.1K Feb 12 11:39 CONTRIBUTING.md
drwxr-xr-x.  7 apache apache  101 Feb 12 11:39 css
drwxr-xr-x.  2 apache apache 4.0K Feb 12 11:41 css_compiled
drwxr-xr-x. 16 apache apache 4.0K Feb 12 11:39 files
drwxr-xr-x.  4 apache apache  24K Feb 12 11:39 front
-rw-r--r--.  1 apache apache 1.1K Feb 12 11:39 .htaccess
drwxr-xr-x.  2 apache apache  184 Feb 12 11:39 inc
-rw-r--r--.  1 apache apache 6.3K Feb 12 11:39 index.php
drwxr-xr-x.  4 apache apache  113 Feb 12 11:39 install
-rw-r--r--.  1 apache apache  682 Feb 12 11:39 INSTALL.md
drwxr-xr-x.  5 apache apache 4.0K Feb 12 11:39 js
drwxr-xr-x.  4 apache apache   53 Feb 12 11:39 lib
-rw-r--r--.  1 apache apache  35K Feb 12 11:39 LICENSE
drwxr-xr-x.  2 apache apache 4.0K Feb 12 11:41 locales
drwxr-xr-x.  2 apache apache    6 Feb 12 11:41 marketplace
drwxr-xr-x. 10 apache apache 4.0K Feb 12 11:39 pics
drwxr-xr-x.  2 apache apache    6 Feb 12 11:41 plugins
drwxr-xr-x.  3 apache apache   34 Feb 12 11:39 public
-rw-r--r--.  1 apache apache 8.6K Feb 12 11:39 README.md
drwxr-xr-x.  3 apache apache   36 Feb 12 11:39 resources
-rw-r--r--.  1 apache apache 1.3K Feb 12 11:39 SECURITY.md
drwxr-xr-x.  2 apache apache  158 Feb 12 11:39 sound
drwxr-xr-x. 25 apache apache  24K Feb 12 11:39 src
-rw-r--r--.  1 apache apache 2.5K Feb 12 11:39 status.php
-rw-r--r--.  1 apache apache  481 Feb 12 11:39 SUPPORT.md
drwxr-xr-x.  8 apache apache 4.0K Feb 12 11:39 templates
drwxr-xr-x. 38 apache apache 4.0K Feb 12 11:41 vendor
drwxr-xr-x.  2 apache apache   21 Feb 12 11:39 version

Does anyone know what and where to look for an error message?

Thanks for your help

Offline

#2 2025-03-12 11:20:45

cconard96
Moderator
Registered: 2018-07-31
Posts: 3,235
Website

Re: Write access denied for configuration files

SELinux configuration issue?


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

#3 2025-03-18 09:41:44

robi
Member
From: Zürich
Registered: 2025-02-06
Posts: 13

Re: Write access denied for configuration files

cconard96 wrote:

SELinux configuration issue?

cool GREAT, thanks for that hint. Now I need to get the correct settings for SELinux.
As soon as I have it, I will paste it here.

Thanks for your help

Offline

#4 2025-03-19 12:28:57

robi
Member
From: Zürich
Registered: 2025-02-06
Posts: 13

Re: Write access denied for configuration files

This should solve the issue with SELinux.

sudo chcon -t httpd_sys_content_t "/var/www/html/" -R
sudo chcon -t httpd_sys_rw_content_t "/var/www/html/" -R
setsebool -P httpd_can_network_connect_db 1

Last edited by robi (2025-03-19 12:33:34)

Offline

Board footer

Powered by FluxBB