&1"; $output = shell_exec($cmd); echo $output; In the tcl " /> &1"; $output = shell_exec($cmd); echo $output; In the tcl " /> &1"; $output = shell_exec($cmd); echo $output; In the tcl "/>

File copy permission denied while using shell_exec in php

556 Views Asked by At

I am running a tcl script from a php file as follows,

$cmd = "tclsh compare.tcl  $src $dst  2>&1";
$output = shell_exec($cmd);
echo $output;

In the tcl script, I am copying one file from one directory to other directory. When I ran the script from terminal, it is working fine. But, when triggered from php, I am getting the following error.

error copying "/somedir/summary.log" to "/anotherdir/summary.log": permission denied while executing "file copy -force $remote_file $local_file"
0

There are 0 best solutions below