CGI Error

Discussion in 'Plesk 6.0 Troubleshooting and Problems' started by jyeung, Jul 30, 2003.

  1. jyeung

    jyeung Guest

    Ever since I upgraded to PSA 6, CGI errors started springing up for whatever reason.

    Anyway, all CGI files return a 500 Internal Server Error.
    The error_log says it's a premature end of script, but it is highly improbable considering it has been running fine before the upgrade.

    In suexec_log, it reads:
    [2003-07-30 21:35:21]: info: (target/actual) uid: (dxforums/dxforums) gid: (psacln/psacln) cmd: hello.cgi
    [2003-07-30 21:35:21]: error: command not in docroot (/home/httpd/vhosts/xxxxxxxxxxxx.com/cgi-bin/hello.cgi)

    Any idea on how to fix this?

    Thanks!
     
  2. GWDGuy

    GWDGuy Guru

    Messages:
    779
    Just guessing here but did you change from standard to RPM version of PSA? Are you sure the paths are set correctly in your scripts to what the upgrade pathes are.

    Did you try adding a -w to the end of the perl path in the script and see if that helps.

    Robert
     
  3. jyeung

    jyeung Guest

    No, but it was a *really* bad upgrade. The server crashed while upgrading from 5 to 6. It took me 3 days to get the server ready again :|.
     
  4. memory

    memory Guest

    If your still having trouble add this to your httpd.conf file

    AddHandler cgi-script .pl
    AddHandler cgi-script .cgi

    This will also allow scripts to be ran outside of the cgi-bin directory.
     
  5. utman

    utman Guest

    the problem is that suexec thinks the scripts should run as psacln when in reality they are actually set to psaserv.
     
  6. stephen

    stephen Guest

    Then how do we fix this, we cant give customers the ability to change ownership but they shouldnt have to wait for tech to manually change the ownersgroup from psaserv to psacln. This is an issue and i am not sure what to do.
     
  7. hardweb

    hardweb Guru

    Messages:
    3,558
    stephen, in what directory you have files with psaserv ownership?
     
  8. stephen

    stephen Guest

    domain.com/cgi-bin/ any file that a customer uploads is uploaded as psaserv and not psacln.
     
  9. hardweb

    hardweb Guru

    Messages:
    3,558
    Do you have psaserv group on the cgi-bin directory?
     
  10. stephen

    stephen Guest

    When one of the last upgrades occurred it changed the group ownership of most of the directories to psaserv including cgi-bin. httpdocs has the same group but uploaded files are made psacln.
     
  11. hostcorp

    hostcorp Guest

    It looks like your suexec has been replaced during the apache upgrade - restore the psa modified version with:

    cp -a /usr/sbin/psa-suexec /usr/sbin/suexec
     
  12. stephen

    stephen Guest

    We are running Freebsd not Redhat.
     
  13. hostcorp

    hostcorp Guest

    Are you jyeung? That's who I was talking to - the error messages in suexec_log lead me to believe the suexec binary has been overwritten.
     

Share This Page