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 2011-08-08 23:59:29

slinx
Member
From: Cleveland, Ohio
Registered: 2011-01-05
Posts: 32

GLPI installation failing, can't write to directories with 777

Hello,

I've installed GLPI before, but I'm trying to install 0.78 again on Scientific LInux 6 64-bit. I am trying to run the install.php script, but the test always fails like this:

Checking write permissions for dump files    

The directory could not be created.
Check permissions to the directory:'../files/_dumps'
Checking write permissions for document files    

The directory could not be created.
Check permissions to the directory:'../files'
Checking write permissions for setting files    

The directory could not be created.
Check permissions to the directory:'../config'
Checking write permissions for session files    

The directory could not be created.
Check permissions to the directory:'../files/_sessions'
Check write permissions for automatic actions files    

The directory could not be created.
Check permissions to the directory:'../files/_cron'
Checking write permissions for cache files    

The directory could not be created.
Check permissions to the directory:'../files/_cache/'
Checking write permissions for graphic files    

The directory could not be created.
Check permissions to the directory:'../files/_graphs'
Checking write permissions for log files    

The file was created but can't be deleted.
Check permissions to the directory:'../files/_log'. 

All the files in /usr/local/glpi are owned by apache:apache which is the user running the webserver. The permissions on all directories are 755, but even if I try to change them to 777, the installation fails with the same errors. I have removed all the .htaccess files from underneath /usr/local/glpi .

Any idea what might be going wrong?

Thank you! Merci!

Offline

#2 2011-08-09 01:14:34

ddurieux
Plugins Dev
From: Propières, France
Registered: 2005-06-17
Posts: 7,521

Re: GLPI installation failing, can't write to directories with 777

chown -R apache:apache glpi/files

Offline

#3 2011-08-09 07:21:05

remi
GLPI-DEV
From: Champagne
Registered: 2007-04-28
Posts: 7,127
Website

Re: GLPI installation failing, can't write to directories with 777

Is SELinux enable ?


Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/

Offline

#4 2011-08-09 15:21:48

slinx
Member
From: Cleveland, Ohio
Registered: 2011-01-05
Posts: 32

Re: GLPI installation failing, can't write to directories with 777

ddurieux wrote:

chown -R apache:apache glpi/files

Thanks, but as I mentioned, I've already done this.

Offline

#5 2011-08-09 16:25:49

slinx
Member
From: Cleveland, Ohio
Registered: 2011-01-05
Posts: 32

Re: GLPI installation failing, can't write to directories with 777

remi wrote:

Is SELinux enable ?

Thank you, that was the issue. setenforce 0 fixed the problem.

We don't use SELinux here, but is there a way to configure SELinux so that GLPI can run?

Offline

#6 2011-08-09 16:27:31

slinx
Member
From: Cleveland, Ohio
Registered: 2011-01-05
Posts: 32

Re: GLPI installation failing, can't write to directories with 777

P.S. Remi, your mirror list parameter in remi.repo http://rpms.famillecollet.com/enterpris … emi/mirror doesn't work with Scientific Linux, because the $releasever variable expands to "6.0" but your link is at "6"...

Offline

#7 2011-08-09 16:42:09

remi
GLPI-DEV
From: Champagne
Registered: 2007-04-28
Posts: 7,127
Website

Re: GLPI installation failing, can't write to directories with 777

The RPM is designed to work with SELinux enable.


Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/

Offline

#8 2011-08-10 18:11:45

slinx
Member
From: Cleveland, Ohio
Registered: 2011-01-05
Posts: 32

Re: GLPI installation failing, can't write to directories with 777

remi wrote:

The RPM is designed to work with SELinux enable.

I did finally get it working with SELinux. I couldn't use your repo, but I installed the rpm from the epel repo.

I was able to create this module to allow the correct permissions, using audit2allow:

module glpi 1.0;

require {
        type usr_t;
        type mysqld_port_t;
        type cron_var_lib_t;
        type httpd_t;
        type etc_t;
        class tcp_socket name_connect;
        class dir { search create write getattr rmdir remove_name add_name };
        class file { read lock create write getattr unlink open append };
}

allow httpd_t cron_var_lib_t:dir { write search rmdir remove_name create getattr add_name };
allow httpd_t cron_var_lib_t:file { write getattr read lock create unlink open };
allow httpd_t etc_t:dir { write remove_name create add_name rmdir };
allow httpd_t etc_t:file { write create unlink };
allow httpd_t mysqld_port_t:tcp_socket name_connect;
allow httpd_t usr_t:dir { create rmdir };
allow httpd_t usr_t:file { write create unlink append };

It's probably more permissive than I need, but it is working now.

Last edited by slinx (2011-08-10 18:12:44)

Offline

#9 2019-03-11 19:10:57

tinchonetuy
Member
Registered: 2019-03-11
Posts: 10

Re: GLPI installation failing, can't write to directories with 777

remi wrote:

The RPM is designed to work with SELinux enable.

how?? please help, same error plus:

SELinux boolean configuration for httpd_can_network_connect --> off (Some features may require this to be on)    Some features may require this to be on
SELinux boolean configuration for httpd_can_network_connect_db --> off (Some features may require this to be on)    Some features may require this to be on
SELinux boolean configuration for httpd_can_sendmail --> off (Some features may require this to be on)    Some features may require this to be on

Offline

#10 2019-03-12 12:11:10

remi
GLPI-DEV
From: Champagne
Registered: 2007-04-28
Posts: 7,127
Website

Re: GLPI installation failing, can't write to directories with 777

see the setsebool getsebool commands and man pages.


Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/

Offline

Board footer

Powered by FluxBB