Topic "How to retain permissions when synchronizing files from local to remote"

Author Message
nickbe
[View user's profile]

Joined: 2017-11-03
Posts: 3
Location: Germany
Is it possible to tell WinSCP to retain all existing permissions when uploading files from local to remote. Especially when overwriting a file, how can I ensure that the resulting file has the same permissions afterwards.
Advertisements
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27059
Location: Prague, Czechia
What protocol?
If SFTP, you may need to turn off Transfer Resume / Transfer to Temporary Filename:
https://winscp.net/eng/docs/resume#automatic
https://winscp.net/eng/docs/ui_pref_resume
nickbe
[View user's profile]

Joined: 2017-11-03
Posts: 3
Location: Germany
martin wrote:
What protocol?
If SFTP, you may need to turn off Transfer Resume / Transfer to Temporary Filename:
https://winscp.net/eng/docs/resume#automatic
https://winscp.net/eng/docs/ui_pref_resume


I'm using a synchronize script via SCP, but I can use sftp if need be.
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27059
Location: Prague, Czechia
nickbe wrote:
I'm using a synchronize script via SCP, but I can use sftp if need be.

Make sure you have Set permissions transfer setting turned off:
https://winscp.net/eng/docs/ui_transfer_custom
nickbe
[View user's profile]

Joined: 2017-11-03
Posts: 3
Location: Germany
How do I set this in a script? And what exactly do I need to set?
To describe the complete set up: I want to use WinScp to backup multiple folders and to be able to restore them without overwriting the existing permissions Rolling Eyes
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27059
Location: Prague, Czechia
That option is off by default.
Your script may take a on-default configuration from WinSCP GUI.
You should better isolate your script from GUI configuration:
https://winscp.net/eng/docs/scripting#configuration
Advertisements

You can post new topics in this forum

Search

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