Before any further "to do", here are some of the relevant pages from the [man]manual[/man]:
[man]copy[/man]
[man]system[/man]
[man]exec [/man]
[man]shell_exec[/man]
[man]passthru[/man]
You might also wish to search these forums. IIRC, I made a rather thorough explanation of these some time ago to someone else. In re: "is there something like die(error) ... some of these can give you a return code; and there's always "if" 😉
Note that if PHP is in safe mode, most of the above bets are off. shell_exec() won't work at all, and system() only works in directories as noted in php.ini....
As for the permissions, 777 should take care of it, but be aware of the fact that folder permissions, not just file permissions, should also be checked.
Finally:
The cp command works perfectly on the command line, so it isn't that.
Are you sure that php knows where "cp" is located? Likely the webserver's path isn't the same as yours ....