Wrong user www-data

Discussion in 'ISPConfig 3 Priority Support' started by biforme, Apr 23, 2021.

  1. biforme

    biforme Member

    Ispconfig 3.2.4, nginx + fpm (php7.3) on ubuntu bionic 18.04 LTS
    I have a strange mistake. The new files, cache and sessions, are saved with user www-data instead of web794:client87 and this creates permissions problems.
    php 7.2 is the default version in the server.
    Code:
    [web794]
    listen = /var/lib/php7.2-fpm/web794.sock
    listen.owner = web794
    listen.group = www-data
    listen.mode = 0660
    user = web794
    group = client87
    
    Code:
    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    [WARN] could not determine server's ip address by ifconfig
    [INFO] OS version is Ubuntu 18.04.4 LTS
     
    [INFO] uptime:  11:43:37 up 99 days, 19:58,  1 user,  load average: 1.10, 0.99, 0.90
     
    [INFO] memory:
                  total        used        free      shared  buff/cache   available
    Mem:           7.6G        4.0G        1.2G        131M        2.3G        3.2G
    Swap:            0B          0B          0B
     
    [INFO] ISPConfig is installed.
    
    ##### ISPCONFIG #####
    ISPConfig version is 3.2.4
    
    
    ##### VERSION CHECK #####
    
    [INFO] php (cli) version is 7.2.24-0ubuntu***.***.***.***
    
    ##### PORT CHECK #####
    
    [WARN] Port 8080 (ISPConfig) seems NOT to be listening
    
    ##### MAIL SERVER CHECK #####
    
    
    ##### RUNNING SERVER PROCESSES #####
    
    [INFO] I found the following web server(s):
        Unknown process (nginx:) (PID 7307)
    [INFO] I found the following mail server(s):
        Unknown process (smtpd) (PID 10943)
    [INFO] I found the following pop3 server(s):
        Dovecot (PID 32504)
    [INFO] I found the following imap server(s):
        Dovecot (PID 32504)
    [INFO] I found the following ftp server(s):
        PureFTP (PID 7876)
    
    ##### LISTENING PORTS #####
    (only        ()
    Local        (Address)
    [anywhere]:25        (10943/smtpd)
    [localhost]:953        (14848/named)
    [anywhere]:443        (7307/nginx:)
    [anywhere]:6081        (32647/varnishd)
    [anywhere]:993        (32504/dovecot)
    [localhost]:6082        (32647/varnishd)
    [anywhere]:10050        (24483/zabbix_agentd)
    [anywhere]:995        (32504/dovecot)
    [localhost]:10023        (21281/postgrey)
    [localhost]:10024        (22691/amavisd-new)
    [localhost]:10025        (16017/smtpd)
    [localhost]:10026        (22691/amavisd-new)
    [localhost]:10027        (32479/master)
    [anywhere]:587        (32479/master)
    [localhost]:6379        (11694/redis-server)
    [localhost]:11211        (3904/memcached)
    [localhost]:12301        (22808/opendkim)
    [anywhere]:110        (32504/dovecot)
    [anywhere]:143        (32504/dovecot)
    [anywhere]:80        (7307/nginx:)
    [anywhere]:8081        (7307/nginx:)
    [anywhere]:465        (14290/smtpd)
    ***.***.***.***:53        (14734/systemd-resol)
    [anywhere]:21        (7876/pure-ftpd)
    ***.***.***.***:53        (14848/named)
    [localhost]:53        (14848/named)
    [anywhere]:22        (1047/sshd)
    *:*:*:*::*:953        (14848/named)
    *:*:*:*::*:443        (7307/nginx:)
    *:*:*:*::*:6081        (32647/varnishd)
    *:*:*:*::*:993        (32504/dovecot)
    [localhost]0050        (24483/zabbix_agentd)
    *:*:*:*::*:995        (32504/dovecot)
    *:*:*:*::*:10024        (22691/amavisd-new)
    *:*:*:*::*:10026        (22691/amavisd-new)
    *:*:*:*::*:3306        (14429/mysqld)
    *:*:*:*::*:6379        (11694/redis-server)
    [localhost]10        (32504/dovecot)
    [localhost]43        (32504/dovecot)
    *:*:*:*::*:80        (7307/nginx:)
    *:*:*:*::*:21        (7876/pure-ftpd)
    *:*:*:*::*:4949        (13357/perl)
    *:*:*:*::*:53        (14848/named)
    *:*:*:*::*:22        (1047/sshd)
    
     
    Last edited: Apr 23, 2021
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    What is in website settings for SuEXEC ? It should be on to force using the website owner and group.
    Have you done any modifications to settings?
     
    biforme likes this.
  3. biforme

    biforme Member

    Hi @Taleman
    I am using nginx and there is no that function in the website settings.
    In vhost I only added the settings for magento.
    Code:
    upstream fastcgi_backend2 {
      server  unix:/run/php/php7.3-fpm.sock;
    }
    And included nginx config shipped from magento 2.
    Code:
    include /etc/nginx/nginx.conf.sample; 
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    And that's the reason for your problem. You configured Nginx to connect to the wrong PHP-FPM pool. Check the original vhost config file that ISPConfig generated, look up the socket path that is used by ISPConfig and use that path in your config snippet.

    And the nginx conf example from Magento might be wrong as well that you included, in case it contains a complete server section and not just rules for locations.
     
    biforme likes this.
  5. biforme

    biforme Member

    Hi @till, thanks for the response.
    This is a part of the vhost. Magento (the version installed on the system) need to work with php 7.3.
    In website settings I have setup php to work with the version 7.3.
    Code:
     location @php {
                try_files $uri =404;
                include /etc/nginx/fastcgi_params;
                fastcgi_pass unix:/var/lib/php7.2-fpm/web794.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_intercept_errors on;
            }
    
    I changed it this way and now it works as it should. Thank you, my fault: -/
    Code:
    upstream fastcgi_backend2 {
      server  unix:/var/lib/php7.2-fpm/web794.sock;
    }
    I use magento nginx.conf.sample on other servers always based on ispconfig 3.2.x + nginx + fpm, but this is the first time this error occurs. The sample is shipped with every new magento.
     
  6. biforme

    biforme Member

    @till
    Just a question.
    Why should I select php7.2 if I have set php7.3 from the site settings?
    I would have expected to find /var/lib/php7.3-fpm/web794.sock; instead there is /var/lib/php7.2-fpm/web794.sock;
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    The path /var/lib/php7.2-fpm is the default socket directory of your system, the number 7.2 is not an indication for a specific PHP version.
     
    biforme likes this.

Share This Page