"Permission Denied" on output of flat file

Author Message
jordan

  • Total Posts : 9
  • Scores: 0
  • Reward points : 0
  • Joined: 6/9/2001
  • Location: USA
  • Status: offline
"Permission Denied" on output of flat file Wednesday, June 13, 2001 1:13 AM (permalink)
0
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...

 
#1
    aspprogrammer

    • Total Posts : 10
    • Scores: 0
    • Reward points : 0
    • Joined: 6/9/2001
    • Location: Belgium
    • Status: offline
    Re: "Permission Denied" on output of flat file Wednesday, June 13, 2001 1:17 AM (permalink)
    0
    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.

     
    #2
      jordan

      • Total Posts : 9
      • Scores: 0
      • Reward points : 0
      • Joined: 6/9/2001
      • Location: USA
      • Status: offline
      Re: "Permission Denied" on output of flat file Wednesday, June 13, 2001 1:18 AM (permalink)
      0
      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..

       
      #3
        aspprogrammer

        • Total Posts : 10
        • Scores: 0
        • Reward points : 0
        • Joined: 6/9/2001
        • Location: Belgium
        • Status: offline
        Re: "Permission Denied" on output of flat file Wednesday, June 13, 2001 1:21 AM (permalink)
        0
        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.

         
        #4

          Online Bookmarks Sharing: Share/Bookmark

          Jump to:

          Current active users

          There are 0 members and 1 guests.

          Icon Legend and Permission

          • 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
          • Read Message
          • Post New Thread
          • Reply to message
          • Post New Poll
          • Submit Vote
          • Post reward post
          • Delete my own posts
          • Delete my own threads
          • Rate post

          2000-2012 ASPPlayground.NET Forum Version 3.9