writing files on HD vs overwriting files on Apache CGI

andu undo at cloud9.net
Wed Feb 19 17:08:01 EST 2003


--On Wednesday, February 19, 2003 22:26:10 +0000 jbv 
<jbv.silences at club-internet.fr> wrote:

> Hi folks,
>
> When using the following script in a regular MC stack :
>
>     open file myFile
>     write myVar to myFile
>     close file myFile
>
> MC overwrites an already existing file, or creates a new
> file with that name on the HD.
>
> But when MC is used as CGI on Apache for instance,
> no new file is created. The only way to achieve this, is
> to place in the right directory a file of same name & type,
> (and full access privilege : 777) and overwrite it with the script.

Do cgis in other languages do what you want? Does the cgi-bin directory 
allow writing to it (777)?

>
> For instance, I have a web page with a form allowing users to
> upload jpg & gif files of their own. The cgi script parses these
> files and is supposed to store them in a specific directory with
> specific names. In order to achieve this, I need to put in advance
> in that directory as many empty files as possible uploads, with
> the right names. Then when a file is uploaded, the content will
> overwrite the corresponding file.
>
> Could some CGI / Apache / Unix guru be kind enough to explain
> why this is so ?
>
> Thanks,
> JB
>
>
> _______________________________________________
> metacard mailing list
> metacard at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/metacard
>



Regards, Andu Novac



More information about the metacard mailing list