Failed to save config: rename (...) Access denied

I just installed Syncthing v. 1.26.1 with choco install syncthing. When I load the web gui, it gives the following error:

Log line from the terminal window:

[N65K3] 2023/11/24 08:46:44 WARNING: Failed to save config: rename \\?\C:\Users\thlw\AppData\Local\Syncthing\.syncthing.tmp.505696885 \\?\C:\Users\thlw\AppData\Local\Syncthing\config.xml: Access denied

Installation and environment

Microsoft Windows 10 Enterprise
10.0.19045 N/A Build 19045
syncthing 1.26.1, Build 2023-11-15

I installed it by going to an admin power shell and typing choco install 1.26.1. I started the server via the Start Menu.

According to Chocolatey Software | Syncthing 1.26.1

This package contains only the CLI program to be launched from the terminal.

Did you install something else as well that made something show up in the start menu?

In any case, my guess from the error is that Syncthing was run as admin and created a config file, and now you’re running it as another user which doesn’t have permission to overwrite that config file. Taking ownership of the file may fix it, or perhaps removing it if you haven’t set up things yet.

Did you install something else as well that made something show up in the start menu?

No, actually I did not.

But the item in the start menu simply runs C:\ProgramData\chocolatey\bin\syncthing.exe, and it then opens a window with the stdout.

my guess from the error is that Syncthing was run as admin

Well the installation was run as admin. I never ran syncthing as admin though.

I think I restarted Syncthing once, and got the same error one more time. Then I went in Explorer to the config file to see if my user had the privileges. I renamed the config.xml file to something else, and back again. After that, I havent seen this error.

Could “access denied” happen for other reasons? If some other process/thread already had opened the destination file?

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