litespeed, chmod conf file to 600

#1
Hello,

I installed lsws without apache conf file(httpd.conf). Then I created a new virtual host in "suEXEC" Template. I added a new user via SSH and made home dir for him and chowned his home dir + all his files to hisusername:hisusername. His home dir(/home/user/) is chmoded to 755 and his /public_html to 711. It worked fine but after that I installed phpbb3 forum and when I tried to chmod config.php to 600 I got an error on the forum:

Fatal error: require() [function.require]: Failed opening required './config.php' (include_path='.:/usr/local/lib/php') in /home/username/public_html/common.php on line 127

When I was using lsws with apache conf file and I had configured suEXEC + suPHP for apache I was able to chmod config file to 600 and it worked fine. I have no idea what could be the problem now.

It works fine when I chmod config.php to 755 but for security reasons I would need a way to configure it to 600.

It's really important for me and I really hope I will get a solution here. George? Others?

Thanks
Best Regards
 

mistwang

LiteSpeed Staff
#2
I think PHP is not in suEXEC mode.
double check the PHP command path in the suEXEC template, make sure it uses the right PHP binary.
 
#5
EX. APP
LSAPI App
$VH_NAME_lsphp
uds://tmp/lshttpd/$VH_NAME_lsphp.sock

SCRIPT HANDLER
Suffix: php5
Type: LiteSpeed API
Name: [VHost Level]: $VH_NAME_lsphp

Does it look ok?
 
#6
Environment is empty, if could be the problem maybe?

And note, I'm using lsws 3.3.24, I haven't updated yet. Litespeed is running as nobody:nobody
If you need any other info let me know, I really need to get it fixed
 
Last edited:
#8
this is for .php5, how about .php ?
Yes, by default there was .php but I changed to .php5 because with .php the server recognizes as php version 4. phpinfo shows I'm running 5.2.9, php -v too but php shell shows I'm running php version 4 and phpmyadmin is not working, guess what, error like it's not compatible with php4 :O

For .php there was:
SCRIPT HANDLER
Suffix: php
Type: LiteSpeed API
Name: [VHost Level]: $VH_NAME_lsphp

Also, I asked about it at WHT forum and I got interesting reply.
I have a couple of lsws5 processes running as nobody:nobody, but with suEXEC they should be running as user:user, isn't it?

Thanks
 

auser

Super Moderator
#10
Yes, by default there was .php but I changed to .php5 because with .php the server recognizes as php version 4. phpinfo shows I'm running 5.2.9, php -v too but php shell shows I'm running php version 4 and phpmyadmin is not working, guess what, error like it's not compatible with php4 :O

For .php there was:
SCRIPT HANDLER
Suffix: php
Type: LiteSpeed API
Name: [VHost Level]: $VH_NAME_lsphp
at the user's phpbb3 forum root, put phpinfo.php, check php version, 4 or 5.2.9?

Also, I asked about it at WHT forum and I got interesting reply.
I have a couple of lsws5 processes running as nobody:nobody, but with suEXEC they should be running as user:user, isn't it?
yes, should be.
 
#11
Fixed, thanks everyone for your help, I cp'd sapi/litespeed/php to /opt/lsws/fcgi-bin/lsphp instead of /opt/lsws/fcgi-bin/lsphp5 and it worked.

Thanks
 
Top