not able to execute cmd.exe [Answered]RSS

8 replies

Last post Feb 17, 2010 09:35 AM by Harikrishna Nair

  • not able to execute cmd.exe

    Feb 16, 2010 06:05 AM|Harikrishna Nair|LINK

    We are using ImageMagick with PHP on Windows 7. None of the ImageMagick commands executed thru PHP scripts are successfully executed (these command inturn use cmd.exe for execution).

    We think this might be a permission issue and tried giving IUSR - execute rights to ImageMagick commands (there is one .exe for each  command and we are executing all the commands thru shell scripts); but this is failing. We are getting "permission denied" error whenever we set IUSR - execute rights.

     Any help on this will be appreciated. 

    windows 7 iusr permission denied cmd.exe

  • Re: not able to execute cmd.exe

    Feb 16, 2010 09:12 AM|jeff@zina.com|LINK

    What user account is attempting to execute the command?  Hint:  It's not the IUSR account...  :)

    Filemon will helop you track this.

    Jeff

    Have you Binged a solution before posting?
  • Re: not able to execute cmd.exe

    Feb 16, 2010 09:23 AM|Harikrishna Nair|LINK

    Thanks for the reply.

    It would be much helpful if you can tell me the exact user. :O

  • Re: not able to execute cmd.exe

    Feb 16, 2010 12:26 PM|don.raman|LINK

    Hi,

    You will need to give appropriate permission to CMD.EXE too. This is however not a good practice and is not recommended too. Follow the article at http://www.iis-aid.com/articles/how_to_guides/install_imagemagick_for_iis.

    Thanks,

    Don.

  • kehand kehand

    70 Posts

    Microsoft

    Re: not able to execute cmd.exe

    Feb 16, 2010 12:34 PM|kehand|LINK

    Hi,

    By default, processes will be launched under the AppPoolIdentity. You can give this special user privileges needed by going to properties for your content folder and giving privileges to the "IIS AppPool\<Application Pool Name>".

    More info here: http://learn.iis.net/page.aspx/624/application-pool-identities/

    HTH,

    kehand

  • Re: not able to execute cmd.exe

    Feb 17, 2010 12:28 AM|Harikrishna Nair|LINK

    Hi don.raman,

     We tried to give both IUSR and DefaultAppPool execute rights to cmd.exe... but it fails (saying that: access denied)

     

  • Re: not able to execute cmd.exe

    Feb 17, 2010 12:34 AM|Harikrishna Nair|LINK

    Hi Jeff,

    Are you referring to DefaultAppPool ? If so, we tried giving execute rights to DefaultAppPool on cmd.exe (which fails: access denied) , my php page and to whole ImageMagick folder. But none of these worked.

     Please help.

  • Re: not able to execute cmd.exe

    Feb 17, 2010 01:24 AM|Harikrishna Nair|LINK

    Hi Kehand,

    We tried giving execute rights to DefaultAppPool on cmd.exe (which fails: access denied) , my php page and to whole ImageMagick folder. But none of these worked. (The rights were given, but the php page still failed to execute the ImageMagick command. The same page works on Windows XP with IIS 6.

     

  • Re: not able to execute cmd.exe

    Feb 17, 2010 09:35 AM|Harikrishna Nair|LINK

    Hi all,

     Thanks for all the help. It was indeed problem of not having assigned DefaultAppPool to the folders and files concerned. Once it was done, the problem was solved.

     The later problem was due to my stupidity of wrong file path.