Access to the path 'C:\Program Files\Duplicati 2\true' is denied


I kept on getting this error when i initially setup Duplicati, by default, as a browser. After digging through some similar issues, I found at that switching to running it as a service would improve the situation - and at least I got rid of that error. After other hours of setting the backups to save to a NAS, i ended up getting two backups successfully save data last thursday, so i figured that ‘this was it’ and I’m now good & stable with Duplicati 2.

Yesterday, however, Duplicati 2 was showing as a fresh install and still kept on asking me to install/activate the 11th of April update (even though i’ve done that countless of times). I shutdown and went to sleep.

Today, the backups are there, however none would even start running with a ‘back to square one’ error:
Access to the path ‘C:\Program Files\Duplicati 2\true’ is denied.

System.UnauthorizedAccessException: Access to the path ‘C:\Program Files\Duplicati 2\true’ is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream…ctor(String path, FileMode mode, FileAccess access)
at Duplicati.Library.Main.Controller.SetupCommonOptions(ISetCommonOptions result, String& paths, IFilter& filter)
at Duplicati.Library.Main.Controller.RunAction[T](T result, String& paths, IFilter& filter, Action`1 method)
at Duplicati.Library.Main.Controller.Repair(IFilter filter)
at Duplicati.Server.Runner.Run(IRunnerData data, Boolean fromQueue)

What is generating this and why on earth did it had perms on Thursday, but it doesn’t have today? Yet it was able to read the configuration files it didn’t read yesterday…
The service runs as ‘Local System’, and has ran as such ever since the setup.

Thank you.

LE: I just noticed that, after yesterday’s update, I have TWO Duplicati’s: the one that’s empty, and that has started running on 8200, and the original one, which was on 8200 on Thursday, HAD the backups complete and now moved onto 8300 and started failing with the error from the subject.

Even LE: The reason is the dreaded ‘run as administrator’ check that got removed with the updated. Why i have TWO duplicati instances running, one as user on 8200 and one as a service on 8300, beats me, but at least everything works now :slight_smile:

1 Like

Hello @TheImmortal and welcome to the forum!

That date sounds like canary, which implies you installed an earlier canary originally. If you were on, for example canary, the update fixes some problems but needs Service or Windows restart.

Activate downloaded upgrade sometimes fail

If you want maximum stability (or at least fewer unexpected breakages, avoid bleeding-edge canary and use beta which is itself not perfect – sometimes backups need to be started again from scratch. Basically, I would recommend it more for short-term recovery, and definitely not long-term archival uses.

This sounded very odd, but there’s one report from 2017 seemingly involving job export/import confusion.

Failed to process element: true #2615

One might be your service, the other might be started at user login. Standard installs don’t do the service.

Migrating from User to Service install on Windows gives some considerations if, for example, one likes the Tray Icon as an indicator for the Service. Regardless, one should remove the start-at-login link, or wind up with two Duplicati instances on different ports. Duplicati.GUI.TrayIcon.exe explains how the port can move.

An existing autostart link can be deleted by going to its folder. Sample directions are in How to Access the Windows 10 Startup Folder. If you like to keep the shortcut in a modified way, e.g. with --no-hosted-server, renaming it will avoid it getting clobbered if you uninstall Duplicati someday, e.g. to do a new install by .msi. When doing such an install, you can keep it from creating a new shortcut by disabling Launch Duplicati at startup early on, then unchecking Launch Duplicati now at the end. Crude, but Service install is crude now.

Installing Duplicati on Windows

I’m glad you got this going so quickly. I thought I’d address some of the oddities you saw (and are seeing).

I’m inclined to go back to 1.x, given the lack of stability I’m finding, but losing another couple of hours reconfiguring it all and getting it to run is not something I’d consider. I’m far from being a computer illiterate, but not being able to get this running right out of the box is harming an otherwise potentially excellent product - i’ve basically been unable to get it to back properly due to permissions issues as either as user or as a service, and when i finally did…being able to get them all to even start after a reboot appears to be a pain. Apparently i either get nothing started or all of them:

I’ll probably reinstall it all, if I find the energy to continue.

Appreciate the assistance :slight_smile:

Does that refer to the Access to the path ‘C:\Program Files\Duplicati 2\true’ is denied.? Originally I was thinking it might have been an accidental reference due to export/import. The true path shouldn’t be there at all though. If you actually have one, I guess you can look at times and permissions closely to see how it differs from its neighbors and take a guess as to how it got there. Another question would be why backup is trying to back it up, but maybe you’re backing your C:\ drive, and it descended? Commandline Commandline arguments box is a good way to see if somehow it has a direct reference.

If true exists, and seems like it doesn’t belong, you can probably delete it. Or if its security permissions somehow lack SYSTEM, I think that can stop even SYSTEM (default Duplicati-as-service user) access.

Out-of-the-box, Duplicati runs as the logging in user at login, so can backup the user but not other users.

As a tech-note on Duplicati processes, they typically start in pairs where the first one is there to start the right update (generally the latest) while not itself being updated. This is design intent behind self-updates:

Updating via web interface vs installing .deb package

however it’s a bit buggy in terms of working as automagically as the UI says. System restart should work. Your process would be more easily examined in Process Explorer for start time, though Task Manager is enough to figure out the user. From your screenshot, Duplicati.Server.exe maybe has two predecessors:

[SOLVED] Is it ok that I see 5 processes of Duplicati in Windows Task manager?

I can’t explain the “nothing” side, but the “all of them” might be the link above plus my earlier commentary. Your service normally starts at boot as SYSTEM, however if the system is starting too much it can hit the 30 second timeout that Windows puts on a service start. Some people work around this by changing the service to do a delayed start. Windows Service fails to start #2717 is my analysis. Problem appears rare. Duplicati.GUI.TrayIcon.exe should start as a pair when you login, and should happen even if service failed.

Seeing in your screenshot means you somehow got to running canary which is sometimes more stable than beta (due to fixes) and sometimes less (due to new bugs). If you reinstall, I suggest an uninstall first (instead of an install-on-top which sometimes has missing files for me for unknown reason).