Duplicacy restore with read-only files on Windows (Failed to open for in-place writing)


I’ve found a small issue when restoring a file which already exists and is read-only.

The original file is read-only at source and is backed up with that flag so when restored the first time it works and creates a read only file, however when restoring again with the -overwrite flag I get the error

Failed to open the file E:\Restore\file.txt for in-place writing

It would be good if -overwrite would still update the file, or perhaps if there was another flag which could allow a force-overwrite of read only files.

Just ran into this as well. Can this be addressed in an upcoming release?
I’m using v2.3.0 (cmd-line).

I’m not sure if it is good for Duplicacy to change the permission of a read-only file and then overwrite it. This can be too aggressive to some users.

1 Like

I somewhat agree here, but as the OP said, maybe a -force-overwrite that indicates we want files overwritten no matter their read-only/chmod current state?