WIN 11: Error saving the file. EBADF: bad file descriptor, write

Steps to reproduce

When the latest version is installed, the antivirus typically protects files against external programs that write to them. Therefore, Obsidian may not be able to access the files and overwrite them.
For some users, the error will occur following these steps:

  1. Update Obsidian with the latest installer.
  2. Open the program.
  3. Write on any note.
  4. The error appears (Error saving the file. EBADF: bad file descriptor, write.).

Did you follow the troubleshooting guide? [Y/N]


Expected result

The error appears where it cannot overwrite the file.

Actual result

Error saving the file. EBADF: bad file descriptor, write.


Windows 11

Additional information

To solve this problem, we need to follow these steps:

  1. Open the Windows settings.
  2. Search for “Ransomware protection.”
  3. Then, select “Allow an app through Controlled folder access.”
  4. Look for the option “Recently blocked apps,” you’ll find obsidian.exe there. (This indicates that Obsidian didn’t have access to the folders due to the antivirus.)
  5. Add “Obsidian.exe” to the allowed apps.




This should be enough to fix the error. If the error persists, it could be due to these reasons:

  1. The file is damaged or corrupted.
  2. The file lacks write permissions. (Navigate to the folder containing all files, then go to Security, and grant all permissions for Obsidian to access.)
  3. The file system is full.

It doesn’t happen to me and I don’t think there’s anything we can do about it other than flagging the false positive to microsoft defender.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.