Thanks for the quick responses!
@WhiteNoise pointed me to the culprit - the .obsidian folder is on read only:
I have no idea how that happened. I did set the folders to hidden a while back because I didn’t want to keep seeing them, but didn’t touch the read-only checkbox.
Strangely even when I remove the write protection it keeps reverting back to read only.
I’ll keep exploring what’s causing this and will post again when I’ve figured it out.
Edit: turns out things were a bit more complicated than that. Every single folder on my local machine and shares had that filled out read-only attribute box. Seems to be some sort of Windows bug that doesn’t actually affect whether a folder can or can’t be written to.
What happened is that I had hidden the .obsidian folder at one point using the Windows attributes. But because that folder is on an UNRAID network drive it seems that the permissions got messed up and even though I un-hid it again later using the Windows dialogue, it didn’t restore the permissions. So after the permissions were changed using chmod -R 777 everything is working perfectly again.