I'am trying to copy a file from a windows serverA (server 2012 R2 Standard) to a windows serverB (server 2012 Standard). ServerA runs IIS 8 (don't know if thats important or not)
I'am using this PHP script (hlutest.php) executed from a client computer invocation: serverA\hlutest:
<?php echo `whoami`;
$file = 'somefile.ini';
//$newfile = "\\\\serverB\\SYS\\Quality\\Documents\\somefile.ini"; // This does not work
$newfile = "C:\\weg\\somefile.ini"; // This works, copy to local server
if (!copy($file, $newfile)) {
echo "<br>failed to copy $file...\n";
}
?>
Whoami returns: nt authority\iusr So the user is iusr
When copying to local serverA the script is succesfull. However copying to remote serverB causes permission error. PHP Warning: copy(\serverB\SYS\quality\Documents\somefile.ini): failed to open stream: Permission denied in D:\inetpub\wwwroot\vak\hlutest.php on line 7
Already tried to set permissions for user "IUSR" on serverB. No succes.
Can anyone point out what steps (step by step) I should take to get copy from serverA to serverB working? Or point me to a thorough tutorial on how to solve this?