Page 1 of 1

Sending a DOS COPY command - Problem - Access Denied!

Posted: Tue Nov 07, 2006 6:20 am
by johnali3n
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Hey all,

I am trying to copy a file over the network to a local store, here is the functions:-

Code: Select all

function copyfile($filename)
{
	echo "Filename = ".$filename."<br />";
	$copyfile = `copy \\\\10.10.0.90\c\Batches\\$filename c:\Inetpub\wwwroot\autochecker`;

	echo "<pre>$copyfile</pre>";
	exit();
}
The $filename variable is fine but I get the following error output:-

"Access Denied"

..........

I tried the command from the host computer, this works - How can there be an authentication issue? Any help would be great.


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Tue Nov 07, 2006 6:53 am
by volka
\\\\10.10.0.90\\c\\Batches\\$filename

By default the php script will run with the permissons of IUSR_machinename under the IIS. Does this account have the proper permissions to access the share? Or did you change the account settings?