php SuEXEC no working?

Discussion in 'Install/Configuration' started by dreamscape, Feb 12, 2007.

  1. dreamscape

    dreamscape Active Member

    On my local development install of LSWS (2.2.6 Standard), I can't get php SuEXEC to work.

    I have followed the instructions at to set up a virtual host for php SuEXEC; however, the lsphp process is still being launched as the lshttpd user when I go to the virtual host's site.

    For php SuEXEC to work, does lshttpd have to run as root? Currently it runs as user www in OS X, which I believe is a rather unprivileged user.

    Thanks in advance for any help :)
  2. mistwang

    mistwang LiteSpeed Staff

    lshttpd need to be started by root user, and change to a nonprivilege user.
    You need to check the user that lscgid run as, should be root.
    Please double check the user who own the document root directory of that vhost. make sure it is not owned by root.

    You can remove the server level script handler setting, so you have to have the vhost level script handler configuration set properly.

    Double check your error.log to make sure everything is OK.
  3. dreamscape

    dreamscape Active Member

    Yes I start it under root and it runs as www.

    PowerBook-G4:~ dreamscape$ sudo lswsctrl start
    [OK] lshttpd: pid=6940.
    PowerBook-G4:~ dreamscape$ ps aux | grep lshttpd
    www       6944   0.4  0.1    46032   1128  ??  S     9:57AM   0:00.02 ./lshttpd
    root      6940   0.2  0.2    46032   2020  ??  S     9:57AM   0:00.09 ./lshttpd
    dreamsca  6952   0.0  0.0    27808      4  p1  R+    9:57AM   0:00.00 grep lshttpd
    PowerBook-G4:~ dreamscape$ 
    PowerBook-G4:~ dreamscape$ ps aux | grep lscgid
    root      6943   0.0  0.0    27260    348  ??  S     9:57AM   0:00.01 lscgid
    dreamsca  6990   0.0  0.0    27808      4  p1  R+    9:58AM   0:00.00 grep lscgid
    PowerBook-G4:~ dreamscape$ 
    No, it is owned by my account user, "dreamscape"

    Ok, I removed the server level script handler setting, but it still starts lsphp as user "www" when I open the vhost:
    PowerBook-G4:~/Sites/flexiecom-core dreamscape$ ps aux | grep lsphp 
    www       7134   0.0  0.4    62924   5260  ??  S    10:00AM   0:00.83 lsphp5
    dreamsca  7140   0.0  0.0    27808      4  p1  R+   10:00AM   0:00.00 grep lsphp
    PowerBook-G4:~/Sites/flexiecom-core dreamscape$ 
    No errors that I can see.

    Since this is a local development setup, maybe it would just be easier to run lshttpd as my user. But now that LSWS is already installed, how can I change the user it runs under?
  4. mistwang

    mistwang LiteSpeed Staff

    Just backup your VHOST configuration and reinstall LSWS.:)

Share This Page