Fix the case when a remote user copy a file with sudo priviledge