meta data for this page
  •  

This is an old revision of the document!


unable to set gid=33

...
2019-07-13 09:14:44 unable to set gid=33 or uid=0 (euid=0): forcing real = effective
2019-07-13 15:38:11 unable to set gid=33 or uid=0 (euid=0): forcing real = effective
...

Reproduction:

mailtest.php
<?php
    $email = "w.nizinski@grinn-global.com";
    $subject = "test z phpa";
    $message = "lorem ipsum";
 
    $mail = \mail($email, $subject, $message);
    print ($mail);
?>

Reason:

Apache Module MPM ITK The MPM ITK Apache module implements restrictions on the use of the setuid() function and the setgid() function. As a result, scripts that depend on these functions may encounter problems. This includes scripts that use the mail() function, the shell_exec function, or the sudo command.

You can resolve these restrictions with one of the following methods:

  • Do not use the MPM ITK Apache module.
  • Update your script to no longer require escalated privileges.
  • Turn off the security and allow users to execute scripts as the root user. You can allow users with a UID or GID between 0 and 4294496296 to bypass security if you add the following code to your /etc/apache2/conf.d/includes/pre_virtualhost_global.conf file.
    <IfModule mpm_itk.c>
    LimitUIDRange 0 4294496296
    LimitGIDRange 0 4294496296
    </IfModule>
    
  
  **Warning:**  We strongly recommend that you do not enable root privileges for your users. This action has major security implications and could endanger your server.