views:

54

answers:

1

I uploaded a basic python script to my shared hosting at Dreamhost, and changed the permissions to 777. It ran fine from the shell (via SSH) but would display a 'Server Error' when called from the browser.

In the error.log, the error was 'Premature end of script headers'.

I wrote to DreamHost, who (surprisingly quickly) replied by changing the permissions to 755, and the script started working properly in apache (I could see the output in the browser).

But this doesn't seem right - how can adding extra lenient permissions break anything from functioning?

+4  A: 

Allowing anyone to edit a CGI script means that it would be easy to insert a backdoor into the system. httpd is correctly disallowing a suspect program to be run.

Ignacio Vazquez-Abrams