GLPI - File Permission Issues

su-toto Posted messages 45 Registration date   Status Member Last intervention   -  
fab-lc Posted messages 1 Status Member -
Hello,

After hours of scouring the web and rummaging through my brain, I'm turning to the knowledge of some of you for a problem that's becoming hard to understand; let me explain:

I have a Fedora 20 server on which I've installed Apache2 (that is, httpd on Fedora) as well as MySQL and PHP5, in short, a brand new and functional LAMP stack (phpMyAdmin works perfectly, etc.)

I wanted to install GLPI to manage the IT assets, so far everything is fine; I downloaded it, copied/pasted the ./glpi directory into /var/www/html/glpi and I chown everything, which gives us:

chown -R apache:apache /var/www/html/glpi

Normally, that should be enough, but nothing happens; during the installation process, I get errors saying that permissions are insufficient to create directories and files

So I decide to give it my all, at least for the time being, since my server is only local:

chmod -R 777 /var/www/html/glpi


I then check with ls -l /var/www/html/glpi and I get:

drwxrwxrwx. 2 apache apache 4096 20 Jun 15:33 ajax
-rwxrwxrwx. 1 apache apache 159 18 Jun 10:18 AUTHORS.txt
-rwxrwxrwx. 1 apache apache 64 18 Jun 10:19 CHANGELOG.txt
drwxrwxrwx. 2 apache apache 4096 20 Jun 15:33 config
-rwxrwxrwx. 1 apache apache 18092 18 Jun 10:18 COPYING.txt
drwxrwxrwx. 2 apache apache 4096 20 Jun 15:33 css
drwxrwxrwx. 13 apache apache 4096 20 Jun 15:33 files
drwxrwxrwx. 2 apache apache 20480 20 Jun 15:33 front
drwxrwxrwx. 2 apache apache 20480 20 Jun 15:33 inc
-rwxrwxrwx. 1 apache apache 6316 18 Jun 10:19 index.php
drwxrwxrwx. 3 apache apache 4096 20 Jun 15:33 install
drwxrwxrwx. 15 apache apache 4096 20 Jun 15:33 lib
-rwxrwxrwx. 1 apache apache 145 18 Jun 10:18 LISEZMOI.txt
drwxrwxrwx. 2 apache apache 4096 20 Jun 15:33 locales
-rwxrwxrwx. 1 apache apache 3398 18 Jun 10:18 login.php
-rwxrwxrwx. 1 apache apache 2107 18 Jun 10:19 logout.php
drwxrwxrwx. 5 apache apache 4096 20 Jun 15:33 pics
drwxrwxrwx. 2 apache apache 4096 20 Jun 15:33 plugins
-rwxrwxrwx. 1 apache apache 122 18 Jun 10:18 README.txt
-rwxrwxrwx. 1 apache apache 16495 18 Jun 10:18 script.js
drwxrwxrwx. 2 apache apache 4096 20 Jun 15:33 scripts
-rwxrwxrwx. 1 apache apache 5632 18 Jun 10:18 status.php


So even a simple guest user could create a folder, modify or create a file, etc.

EXCEPT THAT... Once again during the installation, I still get messages like:

Configuration file write test 

The folder could not be created.
Checking permissions on the directory: /var/www/html/glpi/config'


I specify that I restarted Apache after each of these actions, even tried to stop/start but nothing works...

So if anyone has a suggestion for a problem I couldn't even conceive, it is welcome :-)

Configuration: Linux / Firefox 30.0

2 answers

  1. Thorak83 Posted messages 1140 Status Member 156
     
    Hello,

    Surely Apache is not running with the user apache and the group apache.
    On my machine, it’s the user www-data and the group www-data.

    Check in the file /etc/apache2.conf

    Best regards
    0
    1. su-toto Posted messages 45 Registration date   Status Member Last intervention   2
       
      Hello, thank you for your interest, you must undoubtedly be running on Debian or one of its derivatives. As for me

      cat /etc/passwd returns:

      root:x:0:0:root:/root:/bin/bash
      bin:x:1:1:bin:/bin:/sbin/nologin
      daemon:x:2:2:daemon:/sbin:/sbin/nologin
      adm:x:3:4:adm:/var/adm:/sbin/nologin
      lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
      sync:x:5:0:sync:/sbin:/bin/sync
      shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
      halt:x:7:0:halt:/sbin:/sbin/halt
      mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
      operator:x:11:0:operator:/root:/sbin/nologin
      games:x:12:100:games:/usr/games:/sbin/nologin
      ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
      nobody:x:99:99:Nobody:/:/sbin/nologin
      avahi-autoipd:x:170:170:Avahi IPv4LL Stack:/var/lib/avahi-autoipd:/sbin/nologin
      dbus:x:81:81:System message bus:/:/sbin/nologin
      polkitd:x:999:998:User for polkitd:/:/sbin/nologin
      rtkit:x:172:172:RealtimeKit:/proc:/sbin/nologin
      chrony:x:998:997::/var/lib/chrony:/sbin/nologin
      usbmuxd:x:113:113:usbmuxd user:/:/sbin/nologin
      rpc:x:32:32:Rpcbind Daemon:/var/lib/rpcbind:/sbin/nologin
      openvpn:x:997:996:OpenVPN:/etc/openvpn:/sbin/nologin
      avahi:x:70:70:Avahi mDNS/DNS-SD Stack:/var/run/avahi-daemon:/sbin/nologin
      pulse:x:996:995:PulseAudio System Daemon:/var/run/pulse:/sbin/nologin
      lightdm:x:995:993::/var/lib/lightdm:/sbin/nologin
      rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin
      nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin
      colord:x:994:992:User for colord:/var/lib/colord:/sbin/nologin
      sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
      tcpdump:x:72:72::/:/sbin/nologin
      abcd-server:x:1000:1000:ABCD-server:/home/abcd-server:/bin/bash
      tss:x:59:59:Account used by the trousers package to sandbox the tcsd daemon:/dev/null:/sbin/nologin
      unbound:x:993:991:Unbound DNS resolver:/etc/unbound:/sbin/nologin
      nm-openconnect:x:992:990:NetworkManager user for OpenConnect:/:/sbin/nologin
      apache:x:48:48:Apache:/usr/share/httpd:/sbin/nologin
      mysql:x:27:27:MariaDB Server:/var/lib/mysql:/sbin/nologin
      admin:x:1001:1001::/home/admin:/bin/bash
      0
    2. Thorak83 Posted messages 1140 Status Member 156
       
      What does the Apache config file say about the user and group used?
      0
    3. su-toto Posted messages 45 Registration date   Status Member Last intervention   2
       
      cat /etc/httpd/conf/httpd.conf returns


      ...
      User apache
      Group apache
      ...
      0