php SuEXEC no working?

#1
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 http://www.litespeedtech.com/support/wiki/doku.php?id=litespeed_wiki:cgi_fcgi_lsapi_php_suexec 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 :)
 

mistwang

LiteSpeed Staff
#2
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.
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
mistwang said:
lshttpd need to be started by root user, and change to a nonprivilege user.
Yes I start it under root and it runs as www.

Code:
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$
mistwang said:
You need to check the user that lscgid run as, should be root.
Yes.
Code:
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$
mistwang said:
Please double check the user who own the document root directory of that vhost. make sure it is not owned by root.
No, it is owned by my account user, "dreamscape"

mistwang said:
You can remove the server level script handler setting, so you have to have the vhost level script handler configuration set properly.
Ok, I removed the server level script handler setting, but it still starts lsphp as user "www" when I open the vhost:
Code:
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$
mistwang said:
Double check your error.log to make sure everything is OK.
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?
 
Top