CGI and Admin login fails

#1
After installing LSWS on Redhat 9.0 with the 2.6.5 kernel I am having problems with a couple things..

The webserver serves up the default home page, the PHP, user login, not found page, and access denied links all work.

The Hellowworld CGI page fails with the following error:

503 Service Unavailable
The server is temporarily busy, try again later!

the error.log file listing

2005-05-12 14:14:12.816 [DEBUG] [*] New connection from 192.168.124.9:1470.
2005-05-12 14:14:12.817 [DEBUG] [192.168.124.9:1470-0] HttpIOLink::handleEvents() events=1!
2005-05-12 14:14:12.817 [DEBUG] [192.168.124.9:1470-0] HttpIOLink::handleEvents() events=1!
2005-05-12 14:14:12.817 [DEBUG] [192.168.124.9:1470-0] HttpConnection::eek:nReadEx(), state: 0!
2005-05-12 14:14:12.817 [DEBUG] [192.168.124.9:1470-0] HttpConnection::eek:nReadEx(), state: 0!
2005-05-12 14:14:12.817 [DEBUG] [192.168.124.9:1470-0] readToHeaderBuf().
2005-05-12 14:14:12.817 [DEBUG] [192.168.124.9:1470-0] readToHeaderBuf().
2005-05-12 14:14:12.818 [DEBUG] [192.168.124.9:1470-0] Read from client: 470
2005-05-12 14:14:12.819 [DEBUG] [192.168.124.9:1470-0#Example] run cgi processor header state: 3.
2005-05-12 14:14:12.818 [DEBUG] [192.168.124.9:1470-0] processHeader() return 0, header state: 3.
2005-05-12 14:14:12.818 [DEBUG] [192.168.124.9:1470-0#Example] New request:
Method=[GET], URI=[/cgi-bin/helloworld],
QueryString=[]
Content Length=0
2005-05-12 14:14:12.818 [DEBUG] [192.168.124.9:1470-0#Example] New request:
Method=[GET], URI=[/cgi-bin/helloworld],
QueryString=[]
Content Length=0
2005-05-12 14:14:12.819 [DEBUG] [192.168.124.9:1470-0#Example] HttpIOLink::suspendRead()...
2005-05-12 14:14:12.819 [DEBUG] [192.168.124.9:1470-0#Example] HttpIOLink::suspendRead()...
2005-05-12 14:14:12.819 [DEBUG] [192.168.124.9:1470-0#Example] processContextPath() return 0
2005-05-12 14:14:12.819 [DEBUG] [192.168.124.9:1470-0#Example] processContextPath() return 0.
2005-05-12 14:14:12.819 [DEBUG] [192.168.124.9:1470-0#Example] run cgi processor.
2005-05-12 14:14:12.820 [DEBUG] [uds://usr/share/lsws/admin/conf/.cgid.sock] request [192.168.124.9:1470-0#Example:cgi] is assigned with connection!
2005-05-12 14:14:12.820 [DEBUG] [192.168.124.9:1470-0#Example:cgi] [ExtConn] reconnect()
2005-05-12 14:14:12.820 [DEBUG] [192.168.124.9:1470-0#Example:cgi] [ExtConn] reconnect()
2005-05-12 14:14:12.821 [DEBUG] [192.168.124.9:1470-0#Example:cgi] connection to [uds://usr/share/lsws/admin/conf/.cgid.sock] on request #0, error: Permission denied!
2


***************************************************
next:

The Admin page loads fine, but when I enter my name/password and press OK I get the following error.

Warning: fopen(/usr/share/lsws/admin/conf/htpasswd): failed to open stream: Permission denied in /usr/share/lsws/admin/html.2.0.2/admin/authHeader.php on line 31

Warning: Cannot modify header information - headers already sent by (output started at /usr/share/lsws/admin/html.2.0.2/admin/authHeader.php:31) in /usr/share/lsws/admin/html.2.0.2/admin/authHeader.php on line 64

Warning: Cannot modify header information - headers already sent by (output started at /usr/share/lsws/admin/html.2.0.2/admin/authHeader.php:31) in /usr/share/lsws/admin/html.2.0.2/admin/authHeader.php on line 65


the error log contains.

2005-05-12 14:22:03.840 [DEBUG] [*] New connection from 192.168.124.9:1477.
2005-05-12 14:22:03.840 [DEBUG] [192.168.124.9:1477-0] HttpIOLink::handleEvents(
) events=1!
2005-05-12 14:22:03.840 [DEBUG] [192.168.124.9:1477-0] HttpConnection::eek:nReadEx(
), state: 0!
2005-05-12 14:22:03.840 [DEBUG] [192.168.124.9:1477-0] readToHeaderBuf().
2005-05-12 14:22:03.841 [DEBUG] [192.168.124.9:1477-0] Read from client: 560
2005-05-12 14:22:03.841 [DEBUG] [192.168.124.9:1477-0] processHeader() return 0,
header state: 3.
2005-05-12 14:22:03.841 [DEBUG] [192.168.124.9:1477-0#_AdminVHost] New request:
Method=[GET], URI=[/admin/index.php],
QueryString=[]
Content Length=0
2005-05-12 14:22:03.842 [DEBUG] [192.168.124.9:1477-0#_AdminVHost] HttpIOLink::s
uspendRead()...
2005-05-12 14:22:03.842 [DEBUG] [192.168.124.9:1477-0#_AdminVHost] Find handler
[fcgiAdminPHP] for [.php]
2005-05-12 14:22:03.843 [DEBUG] [192.168.124.9:1477-0#_AdminVHost] processContex
tPath() return 0
2005-05-12 14:22:03.843 [DEBUG] [192.168.124.9:1477-0#_AdminVHost] run fcgi proc
essor.
2005-05-12 14:22:03.843 [DEBUG] [UDS://tmp/lshttpd/admin_php.sock] connection av
ailable!
2005-05-12 14:22:03.843 [DEBUG] [UDS://tmp/lshttpd/admin_php.sock] request [192.
168.124.9:1477-0#_AdminVHost:fcgi] is assigned with connection!
2005-05-12 14:22:03.844 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] FcgiConn
ection::doWrite()
2005-05-12 14:22:03.844 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] FcgiConn
ection::beginRequest()
2005-05-12 14:22:03.844 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] FcgiConn
ection::pendingWrite(),m_iCurStreamHeader=16
2005-05-12 14:22:03.845 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] request
header is done
2005-05-12 14:22:03.845 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] FcgiConn
ection::beginReqBody()
2005-05-12 14:22:03.845 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] FcgiConn
ection::pendingEndStream()
2005-05-12 14:22:03.845 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] ExtConn:
:continueRead()
2005-05-12 14:22:03.845 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] Request
body done!
2005-05-12 14:22:03.846 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] FcgiConn
ection::endOfReqBody()
2005-05-12 14:22:03.846 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] FcgiConn
ection::pendingEndStream()
2005-05-12 14:22:03.846 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] FcgiConn
ection::flush()
2005-05-12 14:22:03.846 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] FcgiConn
ection::suspendWrite()
2005-05-12 14:22:03.847 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] processN
ewReq() return 0.
2005-05-12 14:22:03.847 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] readToHe
aderBuf() return 0.
2005-05-12 14:22:03.847 [DEBUG] [*] 1 connections accepted!
2005-05-12 14:22:04.628 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] ExtConn:
:eek:nRead()
2005-05-12 14:22:04.629 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] FcgiConn
ection::doRead()
2005-05-12 14:22:04.629 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] read 108
0 bytes from Fast CGI.
2005-05-12 14:22:04.629 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] FCGI Hea
der: 0106000104160200
2005-05-12 14:22:04.629 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] process
STDOUT 1046 bytes
2005-05-12 14:22:04.630 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] response
header finished!
2005-05-12 14:22:04.630 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] GZIP res
ponse body!
2005-05-12 14:22:04.631 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] FCGI Hea
der: 0106000100000000
2005-05-12 14:22:04.632 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] FCGI Hea
der: 0103000100080000
2005-05-12 14:22:04.632 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] [EXT] En
dResponse( endCode=0, protocolStatus=0 )
2005-05-12 14:22:04.632 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] release
ExtProcessor!
2005-05-12 14:22:04.633 [DEBUG] [UDS://tmp/lshttpd/admin_php.sock] add recycled
connection to connection pool!
2005-05-12 14:22:04.634 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] call pCo
nn->writeRespBody() to write 307 bytes
2005-05-12 14:22:04.634 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] Written
to client: 671
2005-05-12 14:22:04.634 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] pConn->w
riteRespBody() return 307
2005-05-12 14:22:04.635 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] ReqBody:
0, RespBody: 307, HEC_COMPLETE!
2005-05-12 14:22:04.635 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] m_pHandl
er->onWrite() return 0
2005-05-12 14:22:04.635 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] HttpConn
ection::flush()!
2005-05-12 14:22:04.635 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] HttpConn
ection::nextRequest()!
2005-05-12 14:22:04.635 [DEBUG] [192.168.124.9:1477-0#_AdminVHost:fcgi] HttpExtC
onnector::cleanUp() ...
2005-05-12 14:22:04.679 [DEBUG] [192.168.124.9:1477-1] HttpIOLink::handleEvents(
) events=1!
2005-05-12 14:22:04.679 [DEBUG] [192.168.124.9:1477-1] HttpConnection::eek:nReadEx(
), state: 0!
2005-05-12 14:22:04.680 [DEBUG] [192.168.124.9:1477-1] readToHeaderBuf().
2005-05-12 14:22:04.680 [DEBUG] [192.168.124.9:1477-1] Read from client: 383
2005-05-12 14:22:04.680 [DEBUG] [192.168.124.9:1477-1] processHeader() return 0,
header state: 3.
2005-05-12 14:22:04.680 [DEBUG] [192.168.124.9:1477-1#_AdminVHost] New request:
Method=[GET], URI=[/favicon.ico],
QueryString=[]
Content Length=0
2005-05-12 14:22:04.681 [DEBUG] [192.168.124.9:1477-1#_AdminVHost] HttpIOLink::s
uspendRead()...
2005-05-12 14:22:04.681 [INFO] [192.168.124.9:1477-1#_AdminVHost] File not found
[/usr/share/lsws/admin/html/favicon.ico]
2005-05-12 14:22:04.681 [DEBUG] [192.168.124.9:1477-1#_AdminVHost] processContex
tPath() return 22
2005-05-12 14:22:04.682 [DEBUG] [192.168.124.9:1477-1#_AdminVHost] processNewReq
() return 22.
2005-05-12 14:22:04.682 [DEBUG] [192.168.124.9:1477-1#_AdminVHost] readToHeaderB
uf() return 22.
2005-05-12 14:22:04.682 [DEBUG] [192.168.124.9:1477-1#_AdminVHost] HttpConnectio
n::sendHttpError(),code=404 Not Found
2005-05-12 14:22:04.682 [DEBUG] [192.168.124.9:1477-1#_AdminVHost] HttpConnectio
n::flush()!
2005-05-12 14:22:04.683 [DEBUG] [192.168.124.9:1477-1#_AdminVHost] Written to cl
ient: 581
2005-05-12 14:22:04.683 [DEBUG] [192.168.124.9:1477-1#_AdminVHost] HttpConnectio
n::nextRequest()!
2005-05-12 14:22:06.684 [DEBUG] Failed to execute 'mpstat' command: No such file
or directory
2005-05-12 14:22:06.698 [DEBUG] Failed to execute 'vmstat' command: No such file
or directory
2005-05-12 14:22:06.713 [DEBUG] Failed to execute 'uptime' command: No such file
or directory
2005-05-12 14:22:09.336 [DEBUG] [192.168.124.9:1477-2] Keep-alive timeout, close
!
2005-05-12 14:22:09.336 [DEBUG] [192.168.124.9:1477-2] Close socket ...


There are no entrys in stderr.log for either errors..

Scott
 

mistwang

LiteSpeed Staff
#2
It is a permission problem, the user that the web server process runs as does not have permission to access some files.
It may happens when you install lsws under one user's home directory, which is not world readable, but the server is run on behalf of another user (usually is nobody).

You need to make permission changes or reinstall lsws to another location, or let web server run as the user who own those directories.
 
#3
Thanks. That did it.

I had moved the installation from my dev machine to the embedded server. Once I changed all the directorys and files owner:group attributes to nobody:nobody it fired right up.

This is truely a great product.

Scott
 
Top