reikiman
12-22-2005, 07:31 PM
I was starting to post about a problem I'm having getting some old CGI scripts to work. But I solved the problem, so I thought to instead post the solution.
The problem was that I was getting "500" errors and getting messages like this:
[2005-12-22 14:01:11]: uid: (10043/reiki2) gid: (10001/10001) cmd: first.cgi
[2005-12-22 14:01:11]: target uid/gid (10043/10001 or $ld) mismatch with directory (2522/10043) or program (2522/10043)
That's a very obtuse error message. Oh, and finding where that was going was a trick in the first place since my error log only said:
[Thu Dec 22 13:34:01 2005] [error] [client 64.81.241.122] Premature end of script headers: first.cgi
The first message is going here: /var/log/httpd/suexec_log
In any case, about the obtuse error message. It's rather confusing what it's trying to say. I eventually puzzled out this solution:
chown 10043 first.cgi
chgrp 10001 first.cgi
And now my ten year old CGI scripts are working again on this new host.
UPDATE: Obviously the uid of the first chown command is going to depend on the uid of the account where you're installing the CGI script. In my case 10043 was assigned to the account.
The problem was that I was getting "500" errors and getting messages like this:
[2005-12-22 14:01:11]: uid: (10043/reiki2) gid: (10001/10001) cmd: first.cgi
[2005-12-22 14:01:11]: target uid/gid (10043/10001 or $ld) mismatch with directory (2522/10043) or program (2522/10043)
That's a very obtuse error message. Oh, and finding where that was going was a trick in the first place since my error log only said:
[Thu Dec 22 13:34:01 2005] [error] [client 64.81.241.122] Premature end of script headers: first.cgi
The first message is going here: /var/log/httpd/suexec_log
In any case, about the obtuse error message. It's rather confusing what it's trying to say. I eventually puzzled out this solution:
chown 10043 first.cgi
chgrp 10001 first.cgi
And now my ten year old CGI scripts are working again on this new host.
UPDATE: Obviously the uid of the first chown command is going to depend on the uid of the account where you're installing the CGI script. In my case 10043 was assigned to the account.