Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Scamby

Solved:Upload errors using script to upload files to SFTP, works in GUI

Ended up having to include the full path of the folder from the destination server (not the user mapped one) for the put command to upload to. Not sure why that fixed it but it did.
Scamby

Upload errors using script to upload files to SFTP, works in GUI

When we upload files to an SFTP site using a private key, the transfer works in the GUI. When trying the transfer using a script it errors out, The errors received are "Cannot create remote file", "Permission denied", "Error code: 3" and "Error message from server (US-ASCII): Forbidden". It appears from the logs that WinSCP is attempting to change the timestamp. We have tried the -nopreservetime, -nopermissions and -transfer=automatic switches on the put command in the script with the same result. The vendor who owns the SFTP site had verified the user has permissions to allow uploading the file (again, it works in the GUI).