How to fix a 'Permission denied (preserving times)' ERROR on file.Folder deployment?


Daphne Burgerhoudt -


A deployment of a file.Folder failed with getting the fowlling error:

Copying work/task/artifact/zipfile to /mytarget on host Infrastructure/myserver
Step failed
com.xebialabs.overthere.RuntimeIOException: Cannot copy temporary file ssh:sudo://deployit:user@localhost:22/tmp/ot-20180226T144144699/myfolder to actual file ssh:sudo://deployit:user@localhost:22/mytarget after upload: cp: preserving times for `/mytarget/file001: Permission denied

XL Deploy, file.Folder


The error that you see is coming from the linux system and states that specifically the timestamp of these files cannot be preserved. You might change the permission on the target directory.

If you want to avoid this, you could go into your ext/synthetic.xml file and change how the command is executed by making the following modification:

<type-modification type="overthere.SshHost">
       <property name="sudoCopyFromTempFileCommand" hidden="false" default="cp -r {0} {1}" />

Or use create a new type if you don't want to change the behavior for all deployments to any overthere.SshHost.

<type type="my.SshHost" extends="overthere.SshHost">
       <property name="sudoCopyFromTempFileCommand" hidden="false" default="cp -r {0} {1}" />
Additional Information



kb, how-to, XL Deploy, file.Folder, timestamp