Hi,
I'm trying to run a CGI script on my webserver which gives a server error 500 (Premature end of script headers: test.cgi).
Having done as much googling as I can, I traced this to an error in the suexec log, googling for which seemed to suggest that the problem was that my cgi-bin and the script within had different owners - which they did. However fixing this did not help!
The error I now get is:
[2008-07-23 11:20:40]: target uid/gid (10009/10001 or 2523) mismatch with directory (10036/2523) or program (10036/2523)
The file and directory now have the same permissions, owner and group:
drwxr-xr-x 2 bite psaserv 4096 Jul 23 10:18 cgi-bin
-rwxr-xr-x 1 bite psaserv 75 Jul 23 09:27 test.cgi
So what is the thing in the error which doesn't match, and how do I fix it...?
Interestingly, the cgi script will run in another virtual host on the same web server. Even more interestingly, in the instance where it does work, the file and directory have different permissions and owner groups:
drwxr-x--- 4 g-spa psaserv 4096 Jan 11 2007 cgi-bin
-rwx------ 1 g-spa psacln 75 Jul 23 10:07 test.cgi
Any suggestions as to where I'm going wrong would be greatfully received!
Cheers
Pete
Start Free Trial