I am still getting transfer error with SFTP upload after Preserve
Hi,
We are trying to make a script to upload to an SFTP server and got some problems with the upload due to the preserve time and permissions. We correct it in the manual upload unchecking the Preserve timestamp in the transfer setting preset.
But in the script we cannot fix it. We are using WinSCP version 5.9.6
This is the script call
And the
And the "upload" command:
The log show the next error:
In include the full log for complete info
Any help would be appreciated, thank you
We are trying to make a script to upload to an SFTP server and got some problems with the upload due to the preserve time and permissions. We correct it in the manual upload unchecking the Preserve timestamp in the transfer setting preset.
But in the script we cannot fix it. We are using WinSCP version 5.9.6
This is the script call
"C:\Program Files (x86)\WinSCP\WinSCP.exe" /rawconfig Interface\CopyParam\PreserveTimeDirs=0 Interface\CopyParam\IgnorePermErrors=1 /log="C:\Configuracion_Switch\settings\SDATANOTICIAS.log" /ini="C:\Configuracion_Switch\settings\SDATANOTICIAS.INI" /script="C:\Configuracion_Switch\settings\SDATANOTICIAS.WSCP"
open
command:
open sftp://sftpcrm:*******@sftp.data.prisasd.com/ -hostkey="ssh-ed25519 256 a8:6c:c5:a0:80:3f:fa:ef:5b:6a:4d:61:02:68:60:d0" -privatekey="C:\Configuracion_Switch\settings\PrivateKeyOpenSSHFilezilla.ppk" -rawsettings AgentFwd=1 PreserveTimeDirs=0 IgnorePermErrors=1 -passphrase="*********"
put *.* -delete -nopreservetime -nopermissions
2018-11-06 16:59:52.970 Copying "test.txt" to remote directory started. . 2018-11-06 16:59:52.970 Ascii transfer mode selected. . 2018-11-06 16:59:52.970 Opening remote file. > 2018-11-06 16:59:52.970 Type: SSH_FXP_OPEN, Size: 34, Number: 259 < 2018-11-06 16:59:52.986 Type: SSH_FXP_STATUS, Size: 34, Number: 259 < 2018-11-06 16:59:52.986 Status code: 3, Message: 259, Server: Permission denied, Language: > 2018-11-06 16:59:52.986 Type: SSH_FXP_LSTAT, Size: 18, Number: 519 < 2018-11-06 16:59:53.017 Type: SSH_FXP_STATUS, Size: 29, Number: 519 < 2018-11-06 16:59:53.017 Status code: 2, Message: 519, Server: No such file, Language: * 2018-11-06 16:59:53.017 (ETerminal) Permission denied. * 2018-11-06 16:59:53.017 Error code: 3 * 2018-11-06 16:59:53.017 Error message from server: Permission denied . 2018-11-06 16:59:53.017 Asking user: . 2018-11-06 16:59:53.017 Cannot create remote file '/test.txt'. ("Permission denied. . 2018-11-06 16:59:53.017 Error code: 3 . 2018-11-06 16:59:53.017 Error message from server: Permission denied") < 2018-11-06 16:59:53.017 Script: Cannot create remote file '/test.txt'. < 2018-11-06 16:59:53.017 Script: Permission denied. < 2018-11-06 16:59:53.017 Error code: 3 < 2018-11-06 16:59:53.017 Error message from server: Permission denied * 2018-11-06 16:59:53.017 (EScpSkipFile) Cannot create remote file '/test.txt'. * 2018-11-06 16:59:53.017 Permission denied. * 2018-11-06 16:59:53.017 Error code: 3 * 2018-11-06 16:59:53.017 Error message from server: Permission denied . 2018-11-06 16:59:53.017 Script: Failed . 2018-11-06 16:59:53.017 Script: Exit code: 1 . 2018-11-06 16:59:53.017 Closing connection. . 2018-11-06 16:59:53.017 Sending special code: 12 . 2018-11-06 16:59:53.017 Sent EOF message
Any help would be appreciated, thank you