a script recently messed up my /etc/group file and since then all my cgi scripts stopped working. (oh, i forgot to add, that i restored the file after the incident!)
I always end up with the following error messages in apache's error_log
[Tue Sep 17 19:18:58 2002] [error] [client xxx.xxx.xxx.xxx] (2)No such file or directory: getgrgid: invalid groupid 2299
[Tue Sep 17 19:18:58 2002] [error] (2)No such file or directory: exec of /home/myaccount/public_html/cgi-bin/myscript.cgi failed
[Tue Sep 17 19:18:58 2002] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: /home/myaccount/public_html/cgi-bin/myscript.cgi
The first error seems to indicate, that the groupid 2299 doesn't exist, but in /etc/group it says
...same in the other relevant files.
I even wrote a tiny perl script, which uses the "getgrgid" function and it came up with the right UID, GID & resolved name from GID with getgrgid function.
So, this is a rather weird problem, since everything seems to be fine, but apache still keeps on showing up with the above error messages for any script i try to run.
I am lost here, so any help is more than welcome!
i just disabled suExec and now the cgi scripts are running fine again, but as soon as i enable it again, apache comes up with the above errors.
How can suExec think, that the GIDs don't exist, although they do?
Any other tool, based on bash, perl, php, ... says that the GIDs are ok, but suExec complains.
So, this is a workaround, but i am still lost why suExec produces those errors.