Hey everyone. Just thought I would share a potential fix to a problem I was having.
ERROR INFORMATION
Basically the problem was that occasionally when I was working on a note, the following error would come up:
Failed to save file “FILE_NAME.md”. EACCES: permission denied, open
‘PATH_TO_FILE/FILE_NAME.md’. Make a backup of the contents of this file now to avoid losing data.
Suffice to say, it was driving me round the bend because there wasn’t an obvious reason why, and it started happening out of the blue.
SOLUTION
Because it was saying permission was denied, I got the file permissions for the file in question, and saw that it was missing a few. I can’t remember exactly (and the issue hasn’t come up again since!), but I believe it was either:
-rw-r----- OR -rw-------
I compared this to the files that were working fine (saving when I told them to and not throwing an error) and they had the following permission:
-rw-r--r--
Which (for those not acquainted in this notation) means the owner (me) has read+write permissions, the group has read permissions, and everyone else has read permissions.
So, after changing the file in question to -rw-r--r-- the problem went away. By the way I changed it in terminal with: chmod 644 "FILE_NAME.md"
This resulted in the following being added to the permissions:
Anyway, that’s how I got around the problem. Not entirely sure what caused it. People who are much more experienced at this, please feel free to let me know if I’ve made a mistake in my explanation.
By the way my setup is as follows:
Macbook running Sonoma 14.3.1
Obsidian Version 1.5.8 (Installer 1.5.3)
Community plugins: Copilot (2.4.17), Pandoc Plugin (0.4.1), Pandoc Reference List (2.0.25) and Zotero Integration (3.1.7)
I’ve been trying to figure out a similar issue I’ve been having - there seems to be a lot of chat about it on the forum if you search EACCES.
You mentioned that you have your
Would you mind saying which cloud service you use? No worries if not. I’ve seen Proton and Nextcloud mentioned being used by users having these issues.
I think (I’m no expert either) that because Obsidian writes changes to the .md files as you type (possibly changing the file with each few keystrokes?), with a desktop cloud drive app, it could be its sync function getting triggered regularly - like the .md file changes, then the sync service sees the change, locks the file (removing your write permission), syncs the file, but Obsidian is still trying to write to it. And then maybe there’s some issue merging the file you’re writing in with the one that’s just been sync’d.
I’ve noticed in the developer console in obsidian that it’s throwing an uncaught error, which I guess is a bug, and then the file seems to remain in read only mode, so I’ll look for a report for that - and make one if not.
I’m wondering if it’s something in the interaction with the cloud storage’s sync service that’s causing Obsidian to throw an unrecoverable error, but then I don’t understand why the cloud service wouldn’t return the file to read/write.
So just curious to know anyway. Hope it’s not giving you too much trouble. It only seems to happen for me infrequently. Interesting it doesn’t happend with Obsidian’s own sync service.
Just to follow up - I thought it might be Obsidian and Proton Drive (in my case) competing over who could sync/update first, but actually I think for me it was because my vault was in the cloud, and not locally stored.