Link to home
Start Free TrialLog in
Avatar of claracruz
claracruz

asked on

Permission denied on CreateTextFile

Hi Experts,
I have a problem where read/write permissions has been given on the required directory, and other write requests are granted (though for .asp page creation). However, when I try to create an XML using the following code;-

Set objFS = CreateObject("Scripting.FileSystemObject")
Set objFile = objFS.CreateTextFile(filename)

I get error Permission Denied on line;
Set objFile = objFS.CreateTextFile(filename)

Any help appreciated.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Bob Butcher
Bob Butcher
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of claracruz
claracruz

ASKER

yes... permission granted to IUSR_machine
Try the IWAM_machine account, or whatever account is running your application pool. That is the identity which would create the file.  Could be IWAM_machine, Local System (which would have access), Local Service, or Network Service, unless explicitly changed.

Best of luck,
harperse
samic400:,

IUSR_machine wasn't set correctly... problem solved