posix_getuid is pointing to httpd instead of user from vhost

Discussion in 'Install/Configuration' started by bobykus, Feb 4, 2013.

  1. bobykus

    bobykus Well-Known Member

    Is it normal?
    When I run a script like

    if (touch("/tmp/111")) {
    echo $filename . ' modification time has been changed to present time';
    } else {
    echo 'Sorry, could not change modification time of ' . $filename;
    echo posix_getuid()."\n";
    echo posix_geteuid()."\n";


    results are

    ls -la /tmp/111
    -rw-r--r-- 1 httpd httpd 0 Feb 4 16:28 /tmp/111

    modification time has been changed to present time 398 398

    php compiled with Server API LiteSpeed V6.1, it is running PHP suEXEC / suEXEC Daemon.
  2. mistwang

    mistwang LiteSpeed Staff

    Where did you put the script?
    You can check the user PHP running as with command

    ps -ef | grep php

    also, have you tried PHP suEXEC without suEXEC daemon?
  3. bobykus

    bobykus Well-Known Member

    This is strange part - ps shows lsphp runnin under user privlgs.
    Script is in document root of web site configured and exported from apache.
    I'll do suexec with out demonizing.
    Last edited: Feb 4, 2013
  4. bobykus

    bobykus Well-Known Member

    Yeah, solution is just do not upgrade to latest :)
  5. mistwang

    mistwang LiteSpeed Staff

    should have been fixed in latest build of 4.2.2, please do force update.

Share This Page