This is a discussion on My CGI app can not write or create file in cgi-bin directory within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi I made app which creates file in cgi-bin and writes data to it. If I run this cgi ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi
I made app which creates file in cgi-bin and writes data to it. If I run this cgi app manually from command line everything is OK. If I execute it from webbrowser I get "Internal server error" How to configure apache to allow CGI to write files? greets, Zbiggy |
|
|||
|
Davide Bianchi wrote:
> On 2005-08-09, SPG <zamowienia3@o2.pl> wrote: >> If I execute it from webbrowser I get "Internal server error" > > In the error log there will be more info about what kind of problem > you have. error_log says only this about my script: Premature end of script headers: test.cgi >> How to configure apache to allow CGI to write files? > > Is probably a problem in authorization on the cgi dir, but is a very > bad practice and potentially dangerous thing to do. > > Davide > I only have to write data to file. It does not matter where is it. Where I should place this file to be safe? Is this location will be allowed by apache to write file? greets, Zbiggy |
|
|||
|
SPG wrote:
> Davide Bianchi wrote: > >> On 2005-08-09, SPG <zamowienia3@o2.pl> wrote: >>> If I execute it from webbrowser I get "Internal server error" >> >> In the error log there will be more info about what kind of problem >> you have. > > error_log says only this about my script: > > Premature end of script headers: test.cgi > >>> How to configure apache to allow CGI to write files? >> >> Is probably a problem in authorization on the cgi dir, but is a very >> bad practice and potentially dangerous thing to do. >> >> Davide >> > > I only have to write data to file. It does not matter where is it. Where I > should place this file to be safe? Is this location will be allowed by > apache to write file? > > greets, > Zbiggy Thanks for help. I fixed this. The data file was created manually as root (touch command) and did not have access rights for everybody. |