Topic "File permisson error when doing file sync to a SFTP using winscp assembly"

Author Message
cloudify
[View user's profile]

Joined: 2016-04-05
Posts: 1
Location: Stockholm, Sweden
Hi,

I am using winscp .net assembly in powershell for file synchronization with a SFTP server. I am using the following code for synchronization:

https://winscp.net/eng/docs/library_session_synchronizedirectories#powershell

Problem is, when this script sync files through upload to SFTP it generates error, although it actually uploads the file. The script gets terminated immediately with the following error:

------------------------------------------------------


Upload of C:\FileSync\files\test2.txt succeeded
Permissions of /Reports/test2.txt kept with their defaults
Setting timestamp of /Reports/test2.txt failed: WinSCP.SessionRemoteException: Upload of file 'test2.txt' 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. ---> WinSCP.SessionRemoteException: The server does not support the operation.
Error code: 8
Error message from server: SSHServerAPI.SFTP.fxp_attrs
--- End of inner exception stack trace ---
**Upload of file 'test2.txt' 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.
------------------------------------------------------

I am not finding any way how to "ignore permission error" as it's suggested in the errors.

The script does not complain when do the sync through downloading files from SFTP.

Any help please?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24994
Location: Prague, Czechia
Your duplicate (and answered) post on Stack Overflow:
http://stackoverflow.com/q/36436315/850848
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License