| |
| |
| |
|
Comments:
<0> hello <0> need help <0> cannto write to a file <0> I have changed the permission even to 777 <0> but still cannot write to a file from Firefox <1> For the cgi directory or for the data directory? <0> Darkchanter thanks for responding <1> np <0> Darkchanter I want to write to a text file called data.txt <0> I have chmod 777 data.txt <1> Most ppl aren't here, is all.
<0> hehehe <0> it runs fine from the unix box <0> but not though a browser <1> This is on a win32 box? <0> it is unix <0> http://users.monash.edu.au/~iskandar/cgi-bin/writeCGI.pl <0> if you run that it will give you error permission denied <0> I have this code from Internet <0> Darkchanter please help, I am completely lost <1> It's trying to write to a file called survey.out <0> yes it is <0> I have chmod survey.out too <0> chmod 777 survey.out <1> chmod 777 the directory where the data files are. Then delete the files if they are already there <0> i put this file under cgi-bin directory <0> chmod 777 cgi-bin <1> The directory, not the file. It'll get confused if the script is rewriting the file. <0> is this correct? <0> 1. chmod 777 cgi-bin <0> 2. chmod 777 survey.out <0> is this correct <1> Depends where the script wants to write the file to (normally not the cgi-bin). <0> I have it under cgi-bin <1> The full path to the cgi-bin (which I can't remember). <0> I have chmod 777 cgi-bin <0> chmod 777 /afs/cc.monash.edu.au/users/i/s/iskandar/WWW/cgi-bin <0> this is the full path <1> Now read the script and find where it writes the file and check the directory <1> (Odd that cgi-bin is a subdir of www.) <0> ok <0> open(OUTF,">>survey.out") or dienice("Couldn't open survey.out for <0> writing: $!"); <0> i believe that the survey.out should be written on the cgi-bin directory <1> Certaintly looks that way. <0> -rwxrwxrwx 1 iskandar eln 15 May 17 23:17 survey.out <1> Okay. Run the script from the console and see if you get the same error. <0> still no good <0> > ./writeCGI.pl <0> Content-type:text/html <0> <html><head><title>Thank You</title></head> <0> <body> <0> <h2>Thank You!</h2> <0> Thank you for your feedback.<p>
<0> <a href="index.html">Return to our home page</a><p> <0> </body></html> <0> it is fine <0> this is why it is so wierd <0> I have been spending 5 days <0> Darkchanter: are you there? <1> Hang on <0> thanks <1> Windows has just dissapeared a 120Mb file of mine. <0> sorry <0> http://www.cgi101.com/cl***/ch6/survey.txt <0> this is where I got the script from <0> can you recover your files? <1> I can't find it. I'll have to download the whole damn thing again :( <0> Darkchanter sometimes windows does stupid things <1> This looks quite primitive. Comment out those two lines where it locks the file. <0> hang on <0> flock(OUTF,2); <0> you mean this one <1> The flock and the seek. Doesn't appear to matter though. <0> I did that, still the same problem <1> It works fine from the console and not from the web... <0> that is the problem <0> very wierd <1> ...means that the webuser user account doesn't have write permissions. <0> how to check that <1> You have and it shows that he has. <1> -rwxrwxrwx <0> yes <0> but I donot know why <1> Delete survey.out and try again. More than that all I can suggest is restarting the webserver daemon. <0> I cannot restart it, it belongs to the school <0> is that anything that you can think of <0> can you please upload it onto your server and try it, at least I can confirm that the script is working <1> The script is working - you checked it from the console. <0> yes, I did that <0> just not from the web <0> I guess that is the deadend now <1> Get whomever admins the server to solve the permissions problem. <0> Darkchanter many thanks for your help <0> really appreciate that <1> Which will probably require restarting that daemon or rebooting the box. I can't remember, it's been years since I admined linux. <1> np <0> at least now I feel better <0> so basically ask the admin to restart the webserver admin, or set the permission? <0> I mean the webserver daemon <0> Darkchanter many thanks <0> if there is anything else that I have to do, could you please email me to Johan.Iskandar@gmail.com <0> it is very late now and I am very tired <0> Darkchanter see you later <0> Darkchanter bye
Return to
#perl or Go to some related
logs:
nick magar #allnitecafe footish baby what do worms taste like?
valentina pasis #allnitecafe #india divorced females in bangalore #php hsbc cyberjaya
|
|