Previous Next

Thread: 'Permission denied' in Windows 2003 & IIS6.0...

Last post 07-10-2008 11:14 AM by jonpfl01. 10 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (11 items)

Sort Posts:

  • 02-13-2008, 8:51 AM

    • syslog
    • Not Ranked
    • Joined on 02-13-2008, 1:24 PM
    • Posts 2

    'Permission denied' in Windows 2003 & IIS6.0...

    Hello,

    My script...

    +++++++++++++
    ...
    set WshShell = CreateObject("WScript.Shell")
    set WScriptObj = Server.CreateObject("WScript.Shell")
    inReturn=WshShell.run("C:\Program files\Syslog\Registration.exe",0,true)
    ' test with other process    inReturn=WshShell.run("c:\windows\system32\cmd.exe",0,true)
    ' test with other process    inReturn=WshShell.run("...notepad.exe",0,true)
    ...
    -------------------

    This script work from many years on Windows 2000 Server and IIS 5.0.
    Application was migrated to new server (Windows 2003 R2 SP2 & IIS 6.0).
    All is functionnaly except one execution problem:

    +++++++++++++
    Microsoft VBScript runtime error '800a0046'
    Permission denied
    /register_form.asp, line 34
    -------------------

    Line 34 is 'inReturn=WshShell.run("C:\Program files\Syslog\Registration.exe",0,true)'.

    The folder '"C:\Program files\Syslog\' where application executable is, was received full authorization
    for:

        everyone
        Internet guest account (IUSR_...)
        Network service
        Network
        Users
        ...

    In line 34  I can use many prgm with same result (Permission Denied)  !!!

    Any ideas...
    Thank's...

  • 02-13-2008, 10:26 AM In reply to

    • tomkmvp
    • Top 10 Contributor
    • Joined on 03-20-2003, 10:27 AM
    • Lawrenceville, NJ
    • Posts 3,836
    • IIS MVPs

    Re: 'Permission denied' in Windows 2003 & IIS6.0...

    http://support.microsoft.com/kb/812614

    Make sure IIS_WPG has access to C:\Program FIles\Syslog.

  • 02-13-2008, 10:59 AM In reply to

    • syslog
    • Not Ranked
    • Joined on 02-13-2008, 1:24 PM
    • Posts 2

    Re: 'Permission denied' in Windows 2003 & IIS6.0...

    YES...

    With access defined to IIS_WPG my script work without error  :-))

    Thank you very match to your quick and efficient answer...

  • 02-13-2008, 8:47 PM In reply to

    • alex_fu
    • Not Ranked
    • Joined on 02-14-2008, 1:42 AM
    • Posts 3

    Re: 'Permission denied' in Windows 2003 & IIS6.0...

    Hello,

    I have a very similar situation. This command runs tru DOS window but fails via IIS 6 win 2003

        Set objWShell = CreateObject("WScript.Shell")
        Set objCmd = objWShell.Exec("c:\imail\adduser.exe -h test.com -u testuser -p sdfg")
        strPResult = objCmd.StdOut.Readall()
        set objCmd = nothing: Set objWShell = nothing 

    I have IIS_WPG, IUSR_, IWAM, System, Users with full access and propogation to the folder and just for testing even the website is running under Administrator. I started to itch and loose hair : ). It was working fine on windows 2000 IIS5

    Any ideas?

    Thanks 

     

     

  • 02-13-2008, 11:57 PM In reply to

    Re: 'Permission denied' in Windows 2003 & IIS6.0...

    Enable auditing of 'object failures' in the local security policy, see if anything is in Security event log.  Another couple of tools to use are Regmon and Filemon from Sysinternals.  Auditing, Regmon, Filemon can narrow down if its a obvious permissions issue.  If not, it's something in your local security policy preventing it.

    Steve Schofield
    Windows Server MVP - IIS
    http://weblogs.asp.net/steveschofield

    http://www.IISLogs.com
    Log archival solution
    Install, Configure, Forget
  • 02-14-2008, 1:21 AM In reply to

    • alex_fu
    • Not Ranked
    • Joined on 02-14-2008, 1:42 AM
    • Posts 3

    Re: 'Permission denied' in Windows 2003 & IIS6.0...

    Regmon helped me pinpoint the case, it was the "Network Service" account that needed permissions to the registry.

    Thank you so much for the guidance, nothing could have made me happier today!
     

  • 05-15-2008, 8:20 AM In reply to

    Re: 'Permission denied' in Windows 2003 & IIS6.0...

    I have kind of the same problem using HTMLDOC to create PDF files:

     

    First I have a streamwriter to C:\invoices_pdf\factuur.html (this works perfect)

    then i get permission denied on:

    Set oWSH= Server.CreateObject("WScript.Shell")
    oWSH.Run """C:\Program Files\HTMLDOC\htmldoc.exe"" --webpage -f C:\invoices_pdf\factuur.pdf C:\invoices_pdf\factuur.html", 0, True
    set oWSH = nothing

     I already tried following permissions:

     - IUSR account has full control over htmldoc.exe & invoices_pdf
    - Network service full control
    even: EVERYONE added full control

     

    also tried:
    - adding Everyone to administrators group... (lol!)

     

    didn't work either.. so I'm kinda desperate at the moment :)
     



     

  • 05-15-2008, 8:45 AM In reply to

    • tomkmvp
    • Top 10 Contributor
    • Joined on 03-20-2003, 10:27 AM
    • Lawrenceville, NJ
    • Posts 3,836
    • IIS MVPs

    Re: 'Permission denied' in Windows 2003 & IIS6.0...

    Maybe it's a registry issue like the previous poster had ...

  • 05-15-2008, 6:35 PM In reply to

    Re: 'Permission denied' in Windows 2003 & IIS6.0...

     I don't know, I tried giving IUSR full access to my register, even that didn't work.. I'll also try with network service.. no difference..

  • 05-18-2008, 8:27 PM In reply to

    Re: 'Permission denied' in Windows 2003 & IIS6.0...

    Did you run regmon / filemon / process monitor like I mentioned in the previous post?  Also enable your object failures local security setting, between the object failures and regmon / filemon.  You'll have an idea if there is a permissions issue. 

    Steve Schofield
    Windows Server MVP - IIS
    http://weblogs.asp.net/steveschofield

    http://www.IISLogs.com
    Log archival solution
    Install, Configure, Forget
  • 07-10-2008, 11:14 AM In reply to

    • jonpfl01
    • Not Ranked
    • Joined on 07-10-2008, 11:10 AM
    • Posts 1

    Re: 'Permission denied' in Windows 2003 & IIS6.0...

    steve schofield:

    Did you run regmon / filemon / process monitor like I mentioned in the previous post?  Also enable your object failures local security setting, between the object failures and regmon / filemon.  You'll have an idea if there is a permissions issue. 

     All

    I am having the same exact problem trying to run cscript.  I keep getting permission denied error 70 and do not know where to go from here.  I tried running Process Monitor but I do not fully understand what I am looking at

     This is really frustrating.  Can someone help walk me through the process?  My code is very simple


    <%@ Language=VBScript %>

    <% Option Explicit %>

    <%

    Dim WSHShell, WshEnv, sTemp

    Set WSHShell = CreateObject("WScript.Shell")

    Response.Write("Starts here<br/>")

    on error resume next

    %>

    <pre>

    <%=now()%>

    </pre>

    <%

    sTemp = "cscript"

    WSHShell.Run sTemp

    Response.write "Passed through<br/>"

    if err.number <> 0 then

    response.write "Error detected: " & err.number & ": " & err.Description & "<br/>"

    on error goto 0

    response.end

    end if

    on error goto 0

    Response.write "Run sucessfully<br/>"

    %>

    <pre>

    <%=now()%>

    </pre>

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head>

    <title>jon</title>

    </head>

    <body onload="">

    <table width="100%">

    <tr><td>test</td></tr>

    </table>

    </body>

    </html>


Page 1 of 1 (11 items)
Page view counter