can't overwrite local read-only files
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:
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
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
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:
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
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