Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

FSO.CreateTextFile permission denied: HELP!!!

554 views
Skip to first unread message

Étienne Rivest

unread,
Dec 6, 2003, 12:32:44 PM12/6/03
to
Hi everybody,

I'm trying to create a file using the FileSystemObject but I get a
"Permision denied" error. By the way, I get the same error when I invoque
the msgbox method. I'm using Windows XP pro SP1 installed. Does someone
would have a cue.

If you need more infos, please, do not hesiate to ask.

Thank you in advance.


Roland Hall

unread,
Dec 6, 2003, 6:35:50 PM12/6/03
to
Permission denied means there is a rights issue.
Showing your script will give you a better chance of getting a resolution to
your problem.


--
Roland

This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose.


"Étienne Rivest" <etienne.PR...@sympatico.com> wrote in message
news:2poAb.16415$yd.26...@news20.bellglobal.com...

Étienne Rivest

unread,
Dec 9, 2003, 1:06:42 AM12/9/03
to
There was effectively a rights issue. I solved the problem by including
IWAM_... and IUSR_... in the admin group, which is a working but I feel
inelegant and unsafe solution. It makes no problem in the context since I
am the only user of this computer. Do you suggest something else ?

The script has nothing special. Here is the method, downloaded from the
Internet. The variables not declared within the method are global to the
.ASP file.

Thank you,
Etienne

Public Sub SaveToDisk(sPath)
Dim oFS, oFile
Dim nIndex

If sPath = "" Or FileName = "" Then Exit Sub
If Mid(sPath, Len(sPath)) <> "\" Then sPath = sPath & "\"

Set oFS = Server.CreateObject("Scripting.FileSystemObject")
If Not oFS.FolderExists(sPath) Then Exit Sub

Set oFile = oFS.CreateTextFile(sPath & FileName, True)

For nIndex = 1 to LenB(FileData)
oFile.Write Chr(AscB(MidB(FileData,nIndex,1)))
Next

oFile.Close
End Sub

"Roland Hall" <nobody@nowhere> a écrit dans le message de
news:e727zzEv...@tk2msftngp13.phx.gbl...

Roland Hall

unread,
Dec 10, 2003, 6:07:34 AM12/10/03
to

"Étienne Rivest" wrote:
> There was effectively a rights issue. I solved the problem by including
> IWAM_... and IUSR_... in the admin group, which is a working but I feel
> inelegant and unsafe solution. It makes no problem in the context since I
> am the only user of this computer. Do you suggest something else ?

Instead of adding the IUSR to the Admin group, why not give specific rights
to the path for that user?

0 new messages