CFF KB - Carrz-Fox-Fire Promotions Knowledge Base

CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.
  • Breadrumbs:
  • Microsoft VBScript runtime error '800a0046' Permission denied

  • CFF Knowledge Base - Share With Facebook CFF Knowledge Base - Share on Twitter CFF Knowledge Base - Share on Reddit CFF Knowledge Base - Share on Digg It CFF Knowledge Base - Share on Stumble Upon It CFF Knowledge Base - Share on Delicious
    Share With Friends (Updated 6-8-2010)
  • Article ID:
    198
  • Date Created
    Sunday, January 20, 2013
  • Last Updated
    Sunday, January 20, 2013
  • This Article Has been Viewed
    3244 times
  • Short Desc
    Using the CreateTextFile script will give you a 800a0046 Permission denied error, which means that you do not have the proper rights to the folder you are trying to create a file to.
  • Details
    Using the code CreateTextFile, without the proper permissions, will give you the following error. Making sure that your user has the peroper permissions on the server, will allow for this script to run without issue.

     
    Microsoft VBScript runtime error '800a0046'
    Permission denied
    /test.asp, line 7
  • Recreate Issue
    To recreate this issue:

    Using the following code:

    <%
    set fs=Server.CreateObject("Scripting.FileSystemObject")
    set tfile=fs.CreateTextFile(Server.MapPath("somefile.asp"), true)
    %>


    If you do not have the proper permissions set, then you will get the error.
  • Resolve Issue
    To resolve this issue:

    Perform the following:
    Browse to the location where your file will be created at.
    [Right Click] on the Folder.
    Choose [Properties]
    Choose [Security] tab
    Click the [Add] Button
    Click [Advanced...]
    Click [Find Now]
    Scroll down and choose the following
    [IUSR_<machineName>] and [IWAM_<machineName>]
    (Where <machineName> will be the name of your server)
    Click [OK], then [OK] once more.
    Now, give both users, [Write] Permissions, by putting a check in the Box.
    Click [Apply] then [OK]