In PTL
the existing interface to create temporary file return file name and file descriptor (FD). If test case creaete a file as different users than the current user the file FD is invalid as current user can't make use the returned FD.
For file copy operation PTL does copy file with keeping original permission and then change owner and permissions of file