File permisson error when doing file sync to a SFTP using winscp assembly
hi,
i using winscp .net assembly in powershell file synchronization sftp server. using following code synchronization:
http://winscp.net/eng/docs/library_session_synchronizedirectories#powershell
problem is, when script sync files through upload sftp generates error, although uploads file. script gets terminated following error:
------------------------------------------------------
upload of c:\filesync\files\test2.txt succeeded
permissions of /reports/test2.txt kept defaults
setting timestamp of /reports/test2.txt failed: winscp.sessionremoteexception: upload of file 'test2.txt' successful, error occurred while setting permissions and/or timestamp.
if problem persists, turn off setting permissions or preserving timestamp. alternatively can turn on 'ignore permission errors' option. ---> winscp.sessionremoteexception: server not support operation.
error code: 8
error message server: sshserverapi.sftp.fxp_attrs
--- end of inner exception stack trace ---
**upload of file 'test2.txt' successful, error occurred while setting permissions and/or timestamp.**
if problem persists, turn off setting permissions or preserving timestamp. alternatively can turn on 'ignore permission errors' option.
------------------------------------------------------
i not finding way how "ignore permission error" it's suggested in errors.
the script not complain when sync through downloading files sftp.
any please?
\_(ツ)_/
Windows Server > Windows PowerShell
Comments
Post a Comment