fix copy for sudo non root

fixed case #2837 in which move fails after remote user copies file and sudo to non root does the move