should fix #2837

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