Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


"Permission Denied" on output of flat file

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,159
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> "Permission Denied" on output of flat file
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 "Permission Denied" on output of flat file - 6/13/2001 12:13:35 AM   
  jordan

 

Posts: 9
Score: 0
Joined: 6/9/2001
From: USA
Status: offline
Hi..
I have a survey ASP/VBScript that I want to capture the results from into a flat file..
WOrks great on IIS.. I transfer the code to my test web server and get "Permission
denied" on the file that i'm creating on my web server. no code changes except in location
of file. I've had my administrator check all passwords on the folder/web server and they
have full rights.. Do you have a clue why i may be getting the "Permission Denied" when
CreateTextFile is executed???

Also, I can create a simple text file in the webserver directory and access it.. So, i'm still
not sure about where to go. I have checked the permissions on the folder/file that i'm
trying to access in my webserver directory...

Thanks.. I could sure use help with this.. !!

Here is a sample of my code i'm using..
============================================================
dim ForAppending

ForAppending = 8

strFileName = "\\xxwebdev\test\CSsurvey.txt"

set filesys = createobject("Scripting.FileSystemObject")

if filesys.fileExists(strFileName) then
set filetxt = filesys.OpenTextFile(strFileName, ForAppending, False)
else
set filetxt = filesys.CreateTextFile(strFileName)
end if
===========================================================
"Permission Denied" happens on "createtextfile" line..

Many thanks everyone...
 
 
Post #: 1
 
 Re: "Permission Denied" on output of flat file - 6/13/2001 12:17:04 AM   
  aspprogrammer

 

Posts: 10
Score: 0
Joined: 6/9/2001
From: Belgium
Status: offline
This will be due to the settings on the web server. You will need to pass trusted
connection string as part of the process because the general web visitor account doesn't
have the correct permissions to enable file creation. Speak to the web server admin
people again.

(in reply to jordan)
 
 
Post #: 2
 
 Re: "Permission Denied" on output of flat file - 6/13/2001 12:18:56 AM   
  jordan

 

Posts: 9
Score: 0
Joined: 6/9/2001
From: USA
Status: offline
Hi..
I'm sorry to sound clueless, but i'm not sure i understand what you are saying.. could you
please pass an example to me to make sure i'm understanding what you say I should do..

Many thanks..

(in reply to jordan)
 
 
Post #: 3
 
 Re: "Permission Denied" on output of flat file - 6/13/2001 12:21:28 AM   
  aspprogrammer

 

Posts: 10
Score: 0
Joined: 6/9/2001
From: Belgium
Status: offline
If your web server is running on IIS there will be an Internet Guest Account
[IUSR_SERVERNAME] configured for anonymous access. This is the account that
Windows assigns to any web user who is simply browsing pages on your web site. By
default Windows does not allow write permissions to this account, so your script (which is
probably running under the IUSR_SERVERNAME account) is failing to write to a new
file (the .CreateTextFile command).

The best way forward is to speak to the web server admin guys and ask them to either
allow write permissions in your directory only, or to set up an additional account (in Active
Directory Users - Win2K) for you to use. If they do the latter they will tell you how you
can connect to the new account.

(in reply to jordan)
 
 
Post #: 4
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> "Permission Denied" on output of flat file Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts