On Tue Dec 13 20:50:43 2022 +0000, Zebediah Figura wrote:
I personally use read only files a lot, it's nice to also access them
from Wine file explorers/managers. Of course, Wine can't set read-only on directories, because Windows can't (at least not with same semantics as Unix), so that's fine. You mean files on the Unix side which you've manually set as read-only via chmod? I don't think we'd be breaking that case, it'd only be if a program tries to open those files with FILE_WRITE_ATTRIBUTES, which should be relatively rare. The only known example is Cygwin's unlink(), which is going to need write access to delete the file anyway.
If I remember correctly, AkelPad was one of the apps that checks if its settings file (.ini) is read-only or not, and only complains if it's not read-only but it failed to write to it. For example, if the file isn't marked read-only, but is placed on read-only fs or made immutable, it will complain.
But also it means that Windows applications won't be able to "unset" the unix `read` permission (by marking it as read-only), which is something I'm more concerned about.