CGI-BIN not working

PCONLINE

Verified User
Joined
Jun 9, 2004
Messages
12
Location
Malaysia
Dear Support,
i have this problem on one of my machine which i never have before:

Last login: Mon Dec 20 20:42:12 2004 from *.*.*.*
[root@* root]# tail /var/log/httpd/suexec_log
[2004-12-20 17:24:11]: error: file has no execute permission: (/home/vlad/domains/domain.com/public_html/cgi-bin/dpbalances/balances.pl)

i am not familiar with cgi-bin issues, is there any people out there that could help me with? sincere appreciations... thanks.

regards,
Simon
 
fusionictnl said:
Set the cgi files execute bit. chmod a+x [cgi-file]

Dear Sir,
thanks for your help. the *.cgi files works now. but eventually *.pl files not working, any idea why this happen? seems weird to me anyway..

the errors it says is 'the page cannot be found' and 'HTTP 500 - Internel Server Error' on I.E.

regards,
Simon
 
fusionictnl said:
Check the logs. Check that permissions are 666 no "w" bit.


Dear Sir,
i changed the chmod for the file error.pl and it comes out this:

[2004-12-21 05:06:10]: error: file is writable by others: (/home/vlad/domains/domain.com/public_html/cgi-bin/error.pl)

any idea?

regards,
Simon
 
Last edited:
Chown the cgi-bin directory to belong to vlad:vlad (assuming thats your username ;) )
Then cd into the cgi-bin and chown your perl files vlad:vlad as well. The chmod the cgi-bin and all files in it to 755 using chmod -R
Does that work?

If not, the errors messages from /var/log/httpd/suexec_log will help if you have access to them, if not the apache error logs may help, but not as much.
 
Last edited:
i had the same probs, this solved it though, but why does this happen? Shouldn't the right be ok already?

just chmod 755 for the cgi files doesn't work(for me) i have to chmod the dir too
 
Directory and files must belong to the correct user in order to run, just because thats the way security flows :p

The directory is set with correct permissions when first installed, but because the cgi-bin is owned by the user it's very easy to modify it accidentally without knowing it.
Such as chowning all the files in your public_html directory to username:apache would do it.......
 
Back
Top