Description
- Version: 12.10.0 & 10.10.0 Both tested
- Platform: Linux 3.10.0-1062.el7.x86_64 deps: update openssl to 1.0.1j #1 SMP Thu Jul 18 20:25:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux (RHEL7.7)
- Subsystem: LibUV
require("fs").copyFile("/local/home/dim/testcopy/test.txt","/transfer/repository/Temp/test2.txt", (err) => { if (err) throw err; console.log('source.txt was copied to destination.txt'); } );
strace: https://gist.github.com/likwidoxigen/54a9f34c82772a84ae0a274994ef2774
The EPERM Error is at line 789, I don't know what else may be relevant so I didn't trim anything.
Using "cp" command works with no problem.
The copy fails if source path is on local system or CIFS share as long as destination path is on the CIFS share.
When files are copied or created on that share they are owned by a different user. So files are being copied as user "dim" and the owner that gets automatically set on the share is "cloudxfer".
If I run the script as the "cloudxfer" user, it all runs fine and everything is great, but if I can copy the file from the command line as "dim" I should be able to use copyFile.