We use the copy operations to copy files from a node to windows shares. This is working really great but we get some trouble since upgrading to Jenkins 2.121.1.
Since this upgrade it seems that the file permissions on the copied files are restored. This causes that only the build node can access the copied files and not as expected (and previous working) everyone.
I tried to investigate the changes that were made since the last version and found the issue
Here the method FilePath.copyRecursiveTo() was changed to preserve file permissions.
Actually we executed "icacls" after the copy action as workaround but it would be great if this would not be necessary (as in the past):
"bat("icacls " + share_directory + " /grant *S-1-1-0:(OI)(CI)F /T")