My CGI app can not write or create file in cgi-bin directory

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 ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-09-2005
SPG
 
Posts: n/a
Default My CGI app can not write or create file in cgi-bin directory

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
  #2 (permalink)  
Old 08-09-2005
SPG
 
Posts: n/a
Default Re: My CGI app can not write or create file in cgi-bin directory

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
  #3 (permalink)  
Old 08-09-2005
SPG
 
Posts: n/a
Default Re: My CGI app can not write or create file in cgi-bin directory

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.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 10:27 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0