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

Advertisement

cloudify
Joined:
Posts:
1
Location:
Stockholm, Sweden

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

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?

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum