File UID php suexec

Discussion in 'Install/Configuration' started by subhuti, Aug 30, 2011.

  1. subhuti

    subhuti New Member

    Hello,

    I want to configure php suexec based on the php file UID/GID
    I've changed "ExtApp Set UID Mode" to "File UID" in the vhost template and now PHP scripts works with web server UID/GID , but cgi files (python, ruby) works as expected with file UID/GID

    is it possible to solve this ?
    or does PHP suexec works only with "Doc Root UID" ?

    PS
    we had apache configs before and this configs had "SuexecUserGroup <UID> <users_GID>" defined
    now we've migrated to xml native configs and litespeed PHP works on with DocRoot group instead old <users_GID> :(
  2. mistwang

    mistwang LiteSpeed Staff

    You need to define vhost level lsphp5 external app and script handler, use "Doc root UID", or set UID/GID explicitly in external app configuration.
  3. subhuti

    subhuti New Member

    I'm using default virtual host template "PHP_SuEXEC"
    VHOST level php defined
    in this external app configuration I able to define only one UID/GID
    but I need separate for each user
    so only Doc root ?
  4. subhuti

    subhuti New Member

  5. mistwang

    mistwang LiteSpeed Staff

    if use vhost template, should not set UID/GID in external app, only use Doc root uid.
  6. subhuti

    subhuti New Member

    I did
    created separate VHOST
    created external php app with command "$SERVER_ROOT/fcgi-bin/lsphp5"
    put in the external app configuration "suEXEC User/group" user's username and group
    but php still create files with web server UID/GID
  7. mistwang

    mistwang LiteSpeed Staff

    you may forget to create script handler for ".php" using vhost level lsphp5 external app.
    And the vhost level lsphp5 external app should have unique name, adding username or vhost name as part of the name is recommended.
  8. subhuti

    subhuti New Member

    vhost script handler screenshot http://f.myinvisible.net/d2Vf
    external app configuration http://f.myinvisible.net/yNmY
    Last edited: Sep 3, 2011
  9. mistwang

    mistwang LiteSpeed Staff

    checked the implementation, looks like vhost level external app is not allowed to set suEXEC user/group, please move the external app definition to server level.

Share This Page