Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Permission error, FSO.CreateTextFile 1

Status
Not open for further replies.

barandjelovic

Programmer
May 24, 2001
4
US
Platform: Win2000 Server, IIS 5

Here is the server javascript ASP code:
var fs = Server.CreateObject("Scripting.FileSystemObject");
var path = Server.Mappath("test.template");
var tf = fs.CreateTextFile(path, true); //(line 37)

Here is the error:
Microsoft JScript runtime error '800a0046'
Permission denied
/admin/master.template.new.asp, line 37

Can you please help me configure the permissions so that this page can save the files?

Thank you.
 
IIS creates its own user that has about no rights at all - I once even had to give it explicitely the right to access a database...

Its name is IUSR_[yourcomputer] - this user must be given the right to write to your file. You can for testing purposes give it access to the whole directory, altough this should not be used in a server environment...

As you use a virtual path, the directory to modify was (as you sure know) the same as your master.template.new.asp is in. allow thyself to be the spark that lights the fire
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top