Hello. We have a recurring issue when files are copied between servers. The reason is because of the "scp -p" command. The "-p" tells scp to preserve modification times, access times and modes from the original file. Unfortunately this doesn't work if copying to the target location and the target location already has a file by the same name but owned by a different user. Even if the file permissions are 777.
We can remove the file on the target server and then the transfer will succeed the next time it is migrated.
However, does anyone know if we can change the command being used from "scp -p" to just "scp"? This will resolve our issue. We don't care if the times are preserved from the source.
I haven't been able to figure out where "scp -p" is coded. Possibly it is in the binaries and cannot be changed.