I'm in the middle of coding myself so I'll be brief, help you get some
direction.

First, I wouldn't set you're permissions to 777, BUT that all depends on
what
the user is that would be writing to the file. What I mean is, the web
server
is the one that is going to be writing to the file so, and you may have
created
it so the permissions would look like

rw-rw-r-- danny web survey.out (664 or 660-> if you're parnoid)

or if the web server creates it,

rw-r--r-- webuser web survey.out (644 or 640 -> if you're parnoid)

This assumes that the group that the web server runs under is 'web' and the
web server user is 'webuser'. 

Cool?

Next, you have to make sure that the web server can write to that
directory.

if the directory is:

rwxrwxr-x danny web .

This will work so will,
rwxrwxr-x webuser web .

Check to see if the user or the group has the ability to write to that
directory.

Remember, you want you're permissions as strict as possible, and still
allow you
to do what YOU need to.

using the >> has the ability to create a file, so that should work.

One thing though, I personally wouldn't write to the directory where I
store my 
scripts. If you are writing to a directory it should be out of the document
root.

I've seen people do this and it can be a nightmare to maintain not to
mention a
security hole. Store you're data out of the doc root.

oh, and try.

$file = "/somedir_out_of_doc_root/survey.out";
open(OUTF, ">> $file") or die "Couldn't open $file for INPUT: $!\n";

hope that gets you going.....

Jeff 
On 2001.08.28 22:11 Danny Reyna wrote:
> ive downloaded 
> a simple perl script that im trying to run
> on my computer
> -i use the updated version of indigo perl on win98
> -listed below are the html and scripts
> -can someone tell me where i am going wrong
> -someone on the list told me that i dont have my 
>  permissions set to chmod 777, however from what 
>  ive read that when using win98 you dont have to set
>  a folder to permission  :  but if im wrong how do 
>  i set permissions using   win98/apache webserver
> 
> note: if i add line 
> open(OUTF,">>/cgi-bin/survey.out")  then no
> "survey.out" file is created (i just get the "Couldn't
> open  for writing!" as the perl error msg      
> 
> if i leave the /cgi-bin/ out of the script then i get
> a netscape error msg that says "document contains no
> info - try again later" then a file called survey.out
> is created in my cgi-bin however, no data is written
> in it
> 
> your help in the matter is appreciated
> thanks
> Danny
> 
> 
>  
> 
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to