From: Rutger <te...@xs...> - 2005-11-15 05:56:53
|
Hi All, When installing with apt-get install backuppc this wonderfull program onto a Debian Sarge box, everything goes great. After installing and trying to login into backuppc I get this error in my apache-logs after entering my username and password: Premature end of script headers: index.cgi A problem with CGI you should say. The problem is that this is working fine. The problem is that apache wants to run the index.cgi as user "www-data" and backuppc want to have it runned by "backuppc" What is the solution for this problem ? I have googled for 3 hours with a severla of options and also on Gmane, but no direct solution. Here is some commandline-output when running the scipt as www-data and backuppc: # echo " perl /usr/share/backuppc/cgi-bin/index.cgi" | su - backuppc Content-Type: text/html; charset=ISO-8859-1 <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head> <title>BackupPC Server Status</title> <link rel=stylesheet type="text/css" href="/backuppc/image/BackupPC_stnd.css" title="CSSFile"> <meta http-equiv="pragma" content="no-cache"> </head><body onLoad="document.getElementById('NavMenu').style.height=document.body.scrollHeight"> <a href="http://backuppc.sourceforge.net"><img src="/backuppc/image/logo.gif" hspace="5" vspace="7" border="0"></a><br> <div id="Content"> <div class="h1">BackupPC Server Status</div> <p> <div class="h2">General Server Information</div> <ul> <li> The servers PID is 8707, on host pc...@do..., version 2.1.2, started at 11/15 06:02. <li> This status was generated at 11/15 06:19. <li> The configuration was last loaded at 11/15 06:02. <li> PCs will be next queued at 11/15 07:00. <li> Other info: <ul> <li>0 pending backup requests from last scheduled wakeup, <li>0 pending user backup requests, <li>0 pending command requests, <li>Pool is 0.00GB comprising files and directories (as of 11/15 06:19), <li>Pool hashing gives repeated files with longest chain , <li>Nightly cleanup removed 0 files of size 0.00GB (around 11/15 06:19), <li>Pool file system was recently at 7% (11/15 05:00), today's max is 7% (11/15 05:00) and yesterday's max was %. </ul> </ul> <div class="h2">Currently Running Jobs</div> <p> <table class="tableStnd" border cellspacing="1" cellpadding="3"> <tr class="tableheader"><td> Host </td> <td> Type </td> <td> User </td> <td> Start Time </td> <td> Command </td> <td align="center"> PID </td> <td align="center"> Xfer PID </td> </tr> </table> <p> <div class="h2">Failures that need attention</div> <p> <table class="tableStnd" border cellspacing="1" cellpadding="3"> <tr class="tableheader"><td align="center"> Host </td> <td align="center"> Type </td> <td align="center"> User </td> <td align="center"> Last Try </td> <td align="center"> Details </td> <td align="center"> Error Time </td> <td> Last error (other than no ping) </td></tr> </table> <br><br><br> </div> <div class="NavMenu" id="NavMenu" style="height:100%"> <div class="NavTitle">Hosts</div> <br> <select onChange="document.location=this.value"> <option value="#">Select a host...</option><option value="?host=localhost">localhost</option> </select> <br><br> <form action="" method="get"> <input type="text" name="host" size="14" maxlength="64"> <input type="hidden" name="action" value="hostInfo"><input type="submit" value="Go" name="ignore"> </form> <div class="NavTitle">Server</div> <a href="" class="NavCurrent">Status</a> <a href="?action=adminOpts">Admin Options</a> <a href="?action=summary">Host Summary</a> <a href="?action=view&type=LOG">LOG file</a> <a href="?action=LOGlist">Old LOGs</a> <a href="?action=emailSummary">Email summary</a> <a href="?action=view&type=config">Config file</a> <a href="?action=view&type=hosts">Hosts file</a> <a href="?action=queue">Current queues</a> <a href="?action=view&type=docs">Documentation</a> <a href="http://backuppc.sourceforge.net/faq">FAQ</a> <a href="http://backuppc.sourceforge.net">SourceForge</a> <br><br><br> </div> </body></html> # echo " perl /usr/share/backuppc/cgi-bin/index.cgi" | su - www-data Content-Type: text/html; charset=ISO-8859-1 <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head> <title>BackupPC: Error</title> <link rel=stylesheet type="text/css" href="/backuppc/image/BackupPC_stnd.css" title="CSSFile"> <meta http-equiv="pragma" content="no-cache"> </head><body onLoad="document.getElementById('NavMenu').style.height=document.body.scrollHeight"> <a href="http://backuppc.sourceforge.net"><img src="/backuppc/image/logo.gif" hspace="5" vspace="7" border="0"></a><br> <div id="Content"> <div class="h1">Error: Wrong user: my userid is 33, instead of 110(backuppc) </div> <p>This script needs to run as the user specified in $Conf{BackupPCUser}, which is set to backuppc. <p> This is an installation problem. If you are using mod_perl then it appears that Apache is not running as user backuppc. If you are not using mod_perl, then most like setuid is not working properly on BackupPC_Admin. Check the permissions on /usr/share/backuppc/cgi-bin/BackupPC_Admin and look at the documentation. </p> <br><br><br> </div> <div class="NavMenu" id="NavMenu" style="height:100%"> <form action="" method="get"> <input type="text" name="host" size="14" maxlength="64"> <input type="hidden" name="action" value="hostInfo"><input type="submit" value="Go" name="ignore"> </form> <div class="NavTitle">Server</div> <a href="" class="NavCurrent">Status</a> <a href="?action=adminOpts">Admin Options</a> <a href="?action=summary">Host Summary</a> <a href="?action=view&type=LOG">LOG file</a> <a href="?action=LOGlist">Old LOGs</a> <a href="?action=emailSummary">Email summary</a> <a href="?action=view&type=config">Config file</a> <a href="?action=view&type=hosts">Hosts file</a> <a href="?action=queue">Current queues</a> <a href="?action=view&type=docs">Documentation</a> <a href="http://backuppc.sourceforge.net/faq">FAQ</a> <a href="http://backuppc.sourceforge.net">SourceForge</a> <br><br><br> </div> </body></html> I hope someone is willing to help me ! As faras I know all the right packages are installed, and when Debian needs them and doesn't have them it will automaticly install it. So that should not be the problem. I think it's a user-thing. |