I start winscp.exe (with winscp.ini and privkey) from a flashcard.
I want to write protect the prepared winscp.ini (saved session) to prevent
unintentional change, and avoid repeated writing on flash media (lifetime)
With V 3.8.2:
a readonly file winscp.ini lead always to an error "Unable to write to ..winscp3.ini"
With V 4.0.4:
If I start GUI with readonly winscp.ini everything is ok, winscp.ini is unchanged
on exit and no error messge appears. I assume this is since V4.
But if I start in console mode (winscp.exe session /console /command ....)
at the end the error message window still appear: "Unable to write to ..winscp.ini"
It would be great to avoid writing ini file also in console mode.
best regards and many thanks for that great program :-)
Re: readonly winscp.ini lead to error (command mode)
WinSCP 4.x should report that it cannot write to an INI file even in GUI mode. Are you sure that it does not?
WinSCP needs a write permissions to the INI file even if you do not wish to modify its configuration as it stores there various data, including:
- accepted host keys
- directory cache
- accepted authentication banners
- command/input history
- last opened directories of sessions _________________ Martin Prikryl
yes I am sure, in GUI mode no error message appears on exit,
like in 3.x.
The modification time of the INI-file is not changed like
on exit with write permissions.
Host keys are already saved in the INI file, so it would be
useful to have an option to prevent writing on exit.
Perhaps with a command line argument or with a "No save on exit" configuration parameter in the INI itself.
Perhaps this option will be also useful for the U3 application, where
repeated writing on the flash drive causes problems.
perhaps its my environment that the error msg definitively does not appear.
In the command batch mode however it appear.
But I am using a "clean" WinXp SP2, new installed as test platform with nearly no other SW.
And I use the standalone Winscp program, not the installation package.