Accessing a file in the FPDB folder?

  • Thread starter Thread starter Mr B
  • Start date Start date
M

Mr B

How can I access a file in the fpdb folder via typing in the name or whatever? I have an ASP file
that gives me some sort of error when the file is in the root directory...:

I tried moving the file into the fpdb folder because I know it has special permissions and such but
that didn't work either. Any other suggestions on setting the permissions differently or anything
else ot make this work?

What I'm trying to do is use a form field to modify a file but this is the error returned.



Microsoft VBScript runtime error '800a0046'
Permission denied
/WriteToFile.asp, line 12



<FILE>
<%
Const ForWriting = 2

Dim strPageFileName
strPageFileName = Trim(Request.Form("PhyPath"))

Dim objPageFileFSO
Set objPageFileFSO = CreateObject("Scripting.FileSystemObject")

Dim objPageFileTs
If objPageFileFSO.FileExists(strPageFileName) Then
Set objPageFileTs = objPageFileFSO.OpenTextFile(strPageFileName, ForWriting)
Else
Set objPageFileTs = objPageFileFSO.CreateTextFile(strPageFileName)
End If

Dim strPageEntry
strPageEntry = Trim(Request.Form("File"))
objPageFileTs.WriteLine strPageEntry

objPageFileTs.Close
Response.Redirect "home.htm" 'the page to go to when done
%>
 
You have to place the file in a folder other than the fpdb folder and then
have the host set write/create/modify permissions for the
<IUSER_machinename> account.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
Back
Top