Question

When I login in ssh and run my cgi : everything seems ok

./modulev2.cgi 
Content-type: text/html
Cache-Control: no-cache, no-store
Pragma: no-cache

When I try to call it through http: http://www.capuccino.fr/cgi-bin/modulev2.cgi I got a nasty:

Internal Server Error

I tried to put chmod777 on cgi-bin, on home etc.. with no success

When looking at logs: cgi.log:

[2013-07-22 11:21:12]: uid: (1000/capuccin) gid: (100/users) cmd: modulev2.cgi
[2013-07-22 11:21:12]: target uid/gid (1000/100) mismatch with directory (510/100) or program (0/0)

and error_log

[Mon Jul 22 11:21:03 2013] [error] [client 91.7.112.187] suexec policy violation: see suexec log for more details
[Mon Jul 22 11:21:03 2013] [error] [client 91.7.112.187] Premature end of script headers: modulev2.cgi

I also tried to change chown and got this in cgi.log

[2013-07-22 11:56:36]: target uid/gid (1000/100) mismatch with directory (510/100) or program (1000/100)
[2013-07-22 11:56:39]: uid: (1000/capuccin) gid: (100/users) cmd: modulev2.cgi

Any idea on how to fix that ?

Was it helpful?

Solution

Seems like wrong file/folder permissions.

Try to set permission to 775 and ensure that the owner of the file and folder is correct. Set owner to the same your webserver (something like www-data or apache).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top