Topic "can't overwrite local read-only files"

Author Message
gohai

Guest


Hello,

I regulary make a copy of some configuration and user files of a remote Linux box using WinSCP.

The relevant snippet of a script I use:
Code:
option batch on
option confirm off
option synchdelete on
open user:pw@host
synchronize local "E:\Backup Server\etc\" /etc


This works fine in the first place. However, in a consecutive run, when a file which has mode 700 on the Linux box has been updatet, I get the following error
Quote:
File 'E:\Backup Server\etc\gshadow-' is read-only. Overwrite?
(Y)es, (N)o, (A)bort, N(o) to All, Y(e)s to All: Abort


This is because WinSCP set the read-only flag on the Windows copy when I did the initial run.

There should be a way to syncronize also mode 700 file to a local copy. Either WinSCP should not honor the read-only flag (or unset it and set it again after the copy), or how about an option that makes WinSCP don't set the read-only flag on Windows when copying a mode 700 file (keep in mind that the other unix file permissions are lost, too).

Thanks!
gohai
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27086
Location: Prague, Czechia
I'll make "option confirm off" disable this prompt.

Quote:
how about an option that makes WinSCP don't set the read-only flag on Windows when copying a mode 700 file (keep in mind that the other unix file permissions are lost, too).

See documentation.
gohai

Guest


thanks Smile
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