# Unable to save file (Problems saving: java.nio.file.AccessDeniedException)

**URL:** <https://discourse.jabref.org/t/unable-to-save-file-problems-saving-java-nio-file-accessdeniedexception/3472>\
**Category:** Help\
**Created:** [August 6, 2022, 9:40pm UTC](https://discourse.jabref.org/t/unable-to-save-file-problems-saving-java-nio-file-accessdeniedexception/3472 "2022-08-06T21:40:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![apal90](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/apal90/32/1427_2.png) [@apal90](https://discourse.jabref.org/u/apal90)\
**Post date:** [August 6, 2022, 9:40pm UTC](https://discourse.jabref.org/t/unable-to-save-file-problems-saving-java-nio-file-accessdeniedexception/3472/1 "2022-08-06T21:40:44Z")

</div>

Hello, I have been using JabRef for a couple of years now. Last week, I opened it after a brief gap, and when trying to add a new reference and save, it gave a ‘Could not save file’ error. It keeps happening now, even if I create a new jabref file and copy-paste my references there.

Could this be because I upgraded to Windows 11?

Exception stacktrace:

```auto
org.jabref.logic.exporter.SaveException: Problems saving: java.nio.file.AccessDeniedException: C:\Users\User\Documents\jabRef __libraries\paperBib_mDetermination_Lame2022.bib.tmp -> C:\Users\User\Documents\jabRef__ libraries\paperBib_mDetermination_Lame2022.bib
	at org.jabref@5.7.60000/org.jabref.gui.exporter.SaveDatabaseAction.saveDatabase(Unknown Source)
	at org.jabref@5.7.60000/org.jabref.gui.exporter.SaveDatabaseAction.save(Unknown Source)
	at org.jabref@5.7.60000/org.jabref.gui.exporter.SaveDatabaseAction.save(Unknown Source)
	at org.jabref@5.7.60000/org.jabref.gui.exporter.SaveDatabaseAction.save(Unknown Source)
	at org.jabref@5.7.60000/org.jabref.gui.exporter.SaveAction.execute(Unknown Source)
	at org.jabref@5.7.60000/org.jabref.gui.actions.JabRefAction.lambda$new$3(Unknown Source)
	at org.jabref.merged.module@5.7.60000/org.controlsfx.control.action.Action.handle(Unknown Source)
	at org.jabref.merged.module@5.7.60000/org.controlsfx.control.action.Action.handle(Unknown Source)
	at org.jabref.merged.module@5.7.60000/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
	at org.jabref.merged.module@5.7.60000/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
	at org.jabref.merged.module@5.7.60000/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
	at org.jabref.merged.module@5.7.60000/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@5.7.60000/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@5.7.60000/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
	at org.jabref.merged.module@5.7.60000/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
	at org.jabref.merged.module@5.7.60000/javafx.event.Event.fireEvent(Unknown Source)
	at org.jabref.merged.module@5.7.60000/javafx.scene.control.MenuItem.fire(Unknown Source)
	at org.jabref.merged.module@5.7.60000/com.sun.javafx.scene.control.ControlAcceleratorSupport.lambda$doAcceleratorInstall$2(Unknown Source)
	at org.jabref.merged.module@5.7.60000/com.sun.javafx.scene.KeyboardShortcutsHandler.processAccelerators(Unknown Source)
	at org.jabref.merged.module@5.7.60000/com.sun.javafx.scene.KeyboardShortcutsHandler.dispatchBubblingEvent(Unknown Source)
	at org.jabref.merged.module@5.7.60000/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
	at org.jabref.merged.module@5.7.60000/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@5.7.60000/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@5.7.60000/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@5.7.60000/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@5.7.60000/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
	at org.jabref.merged.module@5.7.60000/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
	at org.jabref.merged.module@5.7.60000/javafx.event.Event.fireEvent(Unknown Source)
	at org.jabref.merged.module@5.7.60000/javafx.scene.Scene$KeyHandler.process(Unknown Source)
	at org.jabref.merged.module@5.7.60000/javafx.scene.Scene.processKeyEvent(Unknown Source)
	at org.jabref.merged.module@5.7.60000/javafx.scene.Scene$ScenePeerListener.keyEvent(Unknown Source)
	at org.jabref.merged.module@5.7.60000/com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(Unknown Source)
	at org.jabref.merged.module@5.7.60000/com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at org.jabref.merged.module@5.7.60000/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleKeyEvent$1(Unknown Source)
	at org.jabref.merged.module@5.7.60000/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown Source)
	at org.jabref.merged.module@5.7.60000/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleKeyEvent(Unknown Source)
	at org.jabref.merged.module@5.7.60000/com.sun.glass.ui.View.handleKeyEvent(Unknown Source)
	at org.jabref.merged.module@5.7.60000/com.sun.glass.ui.View.notifyKey(Unknown Source)
	at org.jabref.merged.module@5.7.60000/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at org.jabref.merged.module@5.7.60000/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.nio.file.AccessDeniedException: C:\Users\User\Documents\jabRef __libraries\paperBib_mDetermination_Lame2022.bib.tmp -> C:\Users\User\Documents\jabRef__ libraries\paperBib_mDetermination_Lame2022.bib
	at java.base/sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
	at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
	at java.base/sun.nio.fs.WindowsFileCopy.move(Unknown Source)
	at java.base/sun.nio.fs.WindowsFileSystemProvider.move(Unknown Source)
	at java.base/java.nio.file.Files.move(Unknown Source)
	at org.jabref@5.7.60000/org.jabref.logic.exporter.AtomicFileOutputStream.close(Unknown Source)
	at java.base/sun.nio.cs.StreamEncoder.implClose(Unknown Source)
	at java.base/sun.nio.cs.StreamEncoder.close(Unknown Source)
	at java.base/java.io.OutputStreamWriter.close(Unknown Source)
	... 42 more

```

---

<div class="post-metadata">

**Author:** ![calixtus](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/calixtus/32/579_2.png) [@calixtus](https://discourse.jabref.org/u/calixtus)\
**Post date:** [August 11, 2022, 3:55pm UTC](https://discourse.jabref.org/t/unable-to-save-file-problems-saving-java-nio-file-accessdeniedexception/3472/2 "2022-08-11T15:55:10Z")

</div>

My very first thought would be that there is some kind of write protection active. Can you please check if ` C:\Users\User\Documents\jabRef__libraries\`  
is write protected in general, also if JabRef has write permission to that folder and if the ransomware-protection of windows is deactivated for jabref?

Thanks.
