+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15

Thread: Math.Function

  1. #1
    Join Date
    May 2009
    Location
    Houston, Tx
    Posts
    237

    Default Math.Formula

    I'm getting an error every time I try to run a this script. I installed the latest MiKTeK (2.7), ImageMagick, and GhostScript on a Microsoft Windows Server 2008 with the Mindtouch 8.08.02 installed and added the Math extension. All the paths are correct.
    I get this error:
    Could not find file 'C:\Windows\TEMP\***************************.png'.
    Where ************** is a string of seemingly random letters, numbers and dashes.
    I have set permissions on the C:\Windows\TEMP\ folder to read and write access. When I manually add any image file with the same name into that folder, it not only reads, but displays that image.
    I think that the error is displaying because one of the programs cannot write to that folder. I am not sure which one or why (as I have given full permissions to any user to read/write to that folder out of desparation).
    Last edited by blakeh; 06-02-2009 at 07:04 PM.

  2. #2
    Join Date
    Jan 2009
    Posts
    34

    Default

    Do you have any files in your temp folder that have the same random character sequence but another extension? (.dvi or .ps would be the two you would expect to see) Please post the file types that you find, this will help determine which step of the latex to png process is failing.

    It seems like the imagemagick conversion of ps to png is what is not happening from my first look at your description.

    Matt

  3. #3
    Join Date
    May 2009
    Location
    Houston, Tx
    Posts
    237

    Default

    Nope, no files in there with the same name. :/

  4. #4
    Join Date
    Jan 2009
    Posts
    34

    Default

    I'm not a Windows server user myself, so I don't know what user runs processes spawned by a web application. You said that you have made your Temp directory world readable and writable, something along the lines of a unix rwxrwxrwx permissions set. Are you sure that the windows web daemon isn't restricted by another set of permissions that are different from those the apply to a standard user?

    Again, I have very little experience with Windows server, but your problem sounds like a permissions issue to me, so I'm just suggesting things you can look into.

    You could also try watching the active processes on your server when you submit your LaTeX equation to make sure all the helper aps (dvips, latex, convert) are running properly.

    FWIW the math extension works quite well in a unix environment.

    Matt

  5. #5
    Join Date
    May 2009
    Location
    Houston, Tx
    Posts
    237

    Default

    Quote Originally Posted by barko192 View Post
    FWIW the math extension works quite well in a unix environment.
    Hah! I only wish we used Linux here. Except I'm the only one who knows how to use it.

    I'll look into that some more. Maybe I missed something.

  6. #6
    Join Date
    Feb 2008
    Location
    London upon Thames
    Posts
    2,792

    Default

    Quote Originally Posted by barko192 View Post
    I'm not a Windows server user myself, so I don't know what user runs processes spawned by a web application.
    Generally the "NT AUTHORITY\NETWORK SERVICE" user for IIS. This user is a low-access account who can run processes and access network resources, as opposed to "LocalSystem", which cannot access the network.

    Don't grant permission on things to NETWORK SERVICE directly - grant it to IIS_WPG, the group that includes the accounts that run IIS worker processes.
    If my post helped you, please click the icon below this post to my reputation. Thanks!

  7. #7
    Join Date
    May 2009
    Location
    Houston, Tx
    Posts
    237

    Default

    Quote Originally Posted by crb View Post
    Generally the "NT AUTHORITY\NETWORK SERVICE" user for IIS. This user is a low-access account who can run processes and access network resources, as opposed to "LocalSystem", which cannot access the network.
    When I switched it to LocalSystem, no giant error occurred and everything worked just fine. But I quickly switched it back after reading this for fear of breaking my wiki. What would happen if I left the Identity as LocalSystem?

    Quote Originally Posted by crb View Post
    Don't grant permission on things to NETWORK SERVICE directly - grant it to IIS_WPG, the group that includes the accounts that run IIS worker processes.
    I gave full permission to the group IIS_WPG and it still didn't work. I went to investigate and found that NETWORK SERVICE is not in the group IIS_WPG. In order to satisfy the masses temporarily gave permission to NETWORK SERVICE to write to the folder C:\Windows\Temp. Now everything works just fine and, as before, no giant error occurred. Would it be problematic to leave it set this way?

  8. #8
    Join Date
    Feb 2008
    Location
    London upon Thames
    Posts
    2,792

    Default

    Quote Originally Posted by blakeh View Post
    When I switched it to LocalSystem, no giant error occurred and everything worked just fine. But I quickly switched it back after reading this for fear of breaking my wiki. What would happen if I left the Identity as LocalSystem?
    Which identity did you change? The app pool? What would happen - probably nothing, but you may have more privileges than you want to give an attacker who finds a vulnerability.

    Quote Originally Posted by blakeh View Post
    I gave full permission to the group IIS_WPG and it still didn't work. I went to investigate and found that NETWORK SERVICE is not in the group IIS_WPG. In order to satisfy the masses temporarily gave permission to NETWORK SERVICE to write to the folder C:\Windows\Temp. Now everything works just fine and, as before, no giant error occurred. Would it be problematic to leave it set this way?
    Not at all. I'm sorry for missing this - NETWORK SERVICE is in IIS_WPG on IIS6.0/Windows Server 2003.
    If my post helped you, please click the icon below this post to my reputation. Thanks!

  9. #9
    Join Date
    Jan 2009
    Posts
    34

    Default

    So does that mean you got the math extension working by monkeying with permissions? If not I was going to give you a list of the actual commands (including arguments) that the math extension uses. These have been invaluable to me in troubleshooting in the past. If everything is fixed, I'll save myself the effort of pulling up the C# source again.

    Matt

  10. #10
    Join Date
    May 2009
    Location
    Houston, Tx
    Posts
    237

    Default

    No need, I got it by messing with permissions specific to windows server 2008. All is well again.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts