Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have Ghostscript, ImageMagick, and IIS 5.0 installed on a Windows 2008 Server box.

I also have a PHP script that runs a conversion script to generate thumbnails for a PDF that is uploaded to a directory:

<?php
    $output = array();
    $ret = 0;
    echo exec('convert D:\content\myfile.pdf[0] D:\content\myfile_thumb_1.jpg', $output, $ret);
    var_dump($ret);
?>

I've determined the issue is that the script, when called from the web browser, runs as user IUSR_[COMPUTERNAME].

As my administrator account, the command successfully executes from the CMD line (duh).

What permissions do I have to change to allow for the thumbnail to be generated by the script/IUSR user?

I've tried changing the permissions on the following:

  • The GhostScript Program Files directory (allowing execute, write, read)
  • The ImageMagick directory (allowing execute, write, read)
  • The upload directory where the thumbnails reside (allowing read, write)

All through Windows Explorer, right clicking the directory, properties, and then the Security tab. I add the permissions to [COMPUTERNAME]/Guests, because IUSR_[COMPUTERNAME] is under the Guests group.

I'm not familiar enough with IIS or Windows to know this, but do you have to reboot the box to update permissions or should it just work after I apply the changes? I have restarted the IIS service.

Note: I've removed the full computer name and replaced it with [COMPUTERNAME] in the above post

share|improve this question
1  
WinSvr2k8 cam with IIS 7.0. How did you get IIS 5 installed? –  uSlackr Jun 6 '12 at 23:45
    
Maybe I need to check again, but it's not my server and I'm not sure what they did to it. I could be wrong about 5.0, but I'm pretty sure it's not 7.0. –  Andrew M Jun 7 '12 at 5:00
    
If you have hacked IIS from Windows 2000 on to Windows 2008 – it really is IIS5 – then expect lots of things to not work. I expect you are mistaken. Check $_SERVER['SERVER_SOFTWARE'] to get version in PHP. –  Richard Jun 7 '12 at 6:32
1  
The best tool for determining if you have permissions issues, when you cannot directly see any access denied errors, is to use Process Monitor with a set of path filters to limit the scope to the tool and the files it works on. Process Monitor will also show you which user identity is being used to perform the accesses. –  Richard Jun 7 '12 at 6:34
    
You might try using iisreset to restart IIS after making those types of changes. –  uSlackr Jun 7 '12 at 11:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.