PDA

View Full Version : Permission error w/ richtext editor


Jim
05-21-2003, 03:25 AM
I'm using a richtext editor to allow a user to modify blocks of code within his site. I've used this technique before but now I'm getting Permission denied when I try to write the file back to the site? I think the code is good... I've used it on another ISP... The red line is where I'm getting the error.

Here is the code:

************************************************** ********************
Dim fs , f , f2, txtData, optTxt, txtRead, fread, gdata, i1,rsSelect
tfilename = Trim(Request.Form("FileName"))
' response.write(" Updated = " & Server.MapPath(tfilename))
Set fs=Server.CreateObject("Scripting.FileSystemObject")
If fs.FileExists(tfilename)=false and tfilename <> "" Then
Set f=fs.CreateTextFile(Server.MapPath(tfilename),true )</font id="red">
txtData=Trim(Request.Form("text"))
Session("strData")=txtData
response.write(txtData)
f.writeline(txtData)
f.close
' response.write(tfilename & " Updated")
Set f=Nothing
Set fs=Nothing
end if


************************************************** *******************

bruce
05-21-2003, 04:22 AM
Do you have FrontPage extension installed?

quote:Originally posted by Jim

I'm using a richtext editor to allow a user to modify blocks of code within his site. I've used this technique before but now I'm getting [b]Permission denied when I try to write the file back to the site? I think the code is good... I've used it on another ISP... The red line is where I'm getting the error.

Here is the code:

************************************************** ********************
Dim fs , f , f2, txtData, optTxt, txtRead, fread, gdata, i1,rsSelect
tfilename = Trim(Request.Form("FileName"))
' response.write(" Updated = " & Server.MapPath(tfilename))
Set fs=Server.CreateObject("Scripting.FileSystemObject")
If fs.FileExists(tfilename)=false and tfilename <> "" Then
Set f=fs.CreateTextFile(Server.MapPath(tfilename),true )</font id="red">
txtData=Trim(Request.Form("text"))
Session("strData")=txtData
response.write(txtData)
f.writeline(txtData)
f.close
' response.write(tfilename & " Updated")
Set f=Nothing
Set fs=Nothing
end if


************************************************** *******************
</blockquote id="quote"></font id="quote">

bruce
06-04-2003, 10:43 AM
Ya... this is a revolving topic that'll never go away until the next version of FP extension.

We'll be releasing a new feature that allow you to control the permission on the folder. That will probably fix a lot of these problem.


[b]quote:Originally posted by eurovw

I had the same problem when I tried to upload a picture thru the web form. I had FP extensions installed. When I uninstalled them, everything started to work.

</blockquote id="quote"></font id="quote">

eurovw
06-04-2003, 11:45 AM
I had the same problem when I tried to upload a picture thru the web form. I had FP extensions installed. When I uninstalled them, everything started to work.