Symptoms

When a File Operation Task performs an FTP or SFTP upload, the upload fails with an error similar to the following:

Could not rename temporary file "file.txt.temp_20210306172938013" to target name "file.txt": Failed.

Cause

When adTempus uploads a file, it uploads to a temporary name (the final name with a timestamp appended), then renames the file to the final name once the transfer completes. This is done to ensure that there is not a partial file on the server if the transfer fails, or an incomplete file during the transfer.

In some cases the user account performing the transfer does not have permission to rename the file, so the rename fails, the file is left with its temporary name, and the task reports a failure.

Resolution

adTempus can be reconfigured to not use a temporary name when uploading (the upload goes directly to the final name).

adTempus 4

In adTempus 4, it is only possible to change this behavior globally within adTempus, so the change will affect all file transfers. To change the configuration:

  1. In the Console go to the Advanced Server Options Window.
  2. Locate the setting named "FileTransfer:UseTempFileForUpload".
  3. Click in the Current Value cell to make it editable, then change the value to "false".
  4. Click OK to save the settings.

The new setting will take effect the next time a file transfer executes.

adTempus 5

Beginning with adTempus 5, the settings for each FTP server and SFTP server inclue a Use temporary file during upload that determines whether a temporary file will be used for transfers to that server.

Status

  • adTempus 4

  • adTempus 5