I have IIS7 server (where i running some PHP) on network drive (drive 1), when im trying acces another network drive (drive 2), where are need to acces PDF files with pdftotext.exe. On drive 1 i also have a virtual/link directory which points on target directory on drive 2 (which i need to access).
There is IUSR, IIS_IUSRS, and my user testUser under who is everything running.
When i try acces files in target directory via PHP its okay, i can read them. But when i try to use exec and pdftotext.exe i get returnvalue 1.
I checked under which user is PHP and exec running, and when i execute this script
echo "user <br>";
echo get_current_user();
echo "<br> who am i in command line? <br>";
$out = array();
exec('cmd /c whoami 2>&1',$out,$exitcode);
echo "<br />EXEC: ( exitcode : $exitcode )";
echo "<hr /><pre>";
print_r($out);
echo "</pre>";
in drive 1 (out of virtual directory) i have information that both things are under testUser. But when i try it in virtual directory, php is runned by testUser, but exec returns 1.
So my question is how i need to set permissions, so i can use exec on remote directories? (testUser have all permision on drive 1, even on target directory on drive 2)