Upload of file .. was successful, but error occurred while setting the permissions and/or timestamp. If the problem persists, turn off setting permissions or preserving timestamp. Alternatively you can turn on ‘Ignore permission errors’ option.

You get this error, when a server fails to update file timestamp or permissions for some reason:

  • On some systems (e.g. Linux), you need to be an owner of the file (write permissions are not enough) to modify its permissions or timestamp (you will see an error like “Permissions denied” in error details).
  • Some servers do not support updating file timestamp or permissions at all (you will see an error like “The server does not support the operation” in error details).
  • Some servers are set up to pickup any uploaded file immediately, process it somehow and delete or move it away. If the server is quick enough, it does that before WinSCP is able to update the file timestamp or permissions (you will see an error like “No such file or directory” in error details).

Advertisement

Whatever the reason is, you need to turn off Set permissions and Preserve timestamp options or turn on Ignore permission errors.

Note that you cannot disable preserving timestamp for synchronization, unless you turn off Modification timestamp comparison criteria.

Scripting

When using scripting, add -nopreservetime switch to put command. If you are not running scripting with default isolated configuration, you may also need to add -nopermissions switch (what is the default settings).

With synchronize command, this works only when -criteria lacks time and it never works in both mode.

.NET Assembly

When using .NET assembly, set TransferOptions as shown in following examples:

C# example:

TransferOptions transferOptions = new TransferOptions();
...
transferOptions.FilePermissions = null; // This is default
transferOptions.PreserveTimestamp = false;

PowerShell example:

$transferOptions = New-Object WinSCP.TransferOptions
...
$transferOptions.FilePermissions = $Null # This is default
$transferOptions.PreserveTimestamp = $False

Advertisement

With Session.SynchronizeDirectories, this works only when criteria parameter lacks SynchronizationCriteria.Time and it never works when mode parameter is SynchronizationMode.Both (learn enumeration syntax in PowerShell).

In Other Languages

  • Deutsch – Das Hochladen der Datei … war erfolgreich, aber es trat ein Fehler beim Setzen der Berechtigungen und/oder der Dateizeit auf. Wenn das Problem weiterbestehen bleibt, schalten Sie die Option ‘Berechtigungsfehler ignorieren’ ein.
  • Español – Subida de archivo … fue exitosa, pero ocurrió un error mientras se asignavan los permisos o la fecha. Si el problema persiste, apage la opción de permisos o conservar fecha. Opcionalmente puedes intentar con la opción de’Ignorar Errores de permisos’.
  • Français – Envoi du fichier … réussi, mais une erreur est survenue lors de l’ajout des permissions et/ou de l’horodatage. Si le problème persiste, désactiver l’ajout des permissions ou la préservation de l’horodatage. Autrement, vous pouvez activer l’option ‘Ignorer les erreurs de permission’
  • Italiano – Upload del file … terminato con successo, ma si è verificato un errore impostando permessi e/o timestamp. Se il problema persiste, disattiva ‘Imposta permessi’ o ‘Mantieni timestamp’. In alternativa puoi attivare ‘Ignora errori su permessi’.

Last modified: by martin