NOTICE: Branded Content
NOTICE: Certain versions of content (“Material”) accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.
Project and Portfolio Management User Discussions

SCPClient:Error: transfer failed because of "scp -p" command

John Stapp
New Member

SCPClient:Error: transfer failed because of "scp -p" command

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.



Re: SCPClient:Error: transfer failed because of "scp -p" command

Hi John

This is hard coded in the source code. If you want to be able to turn off the  "-p" parameter, you'll need to open an Enhancement Request with Micro Focus Support.

I do have a few questions:

1) What PPM Version are you using, and do you have any plan for upgrade in the next year?

2) What version of the File copy protocol are you using? SCP or SCP2 (Legacy) or SCP2?

3) Are you sure that there won't be any side effects of removing -p and thus get a different timestamp for the copied file? Can't you think of a scenario where that would be a problem?

Kind Regards,


Top Contributors Last 30 Days