Cannot access network folder

Hello Jon

Uninstall old duplicati and install the latest version, I could install Duplicati as a service, but now I have another more serious problem, then when importing a backup configuration file, duplicati no longer access a configured network folder. I can not access a connected network folder either when creating a new backup

The local SYSTEM account doesn’t have permissions to network folders.
Open the Services MMC (services.msc), right click “Duplicati service”, click Properties, click the Logon tab and start the service using another account with administrative privileges to the local system and R/W permissions to the network share.
If you have a mapped network drive (you seem to have mapped drive Z: to it) use your current username/password.
Restart the Duplicati service and you should be able to access the network share from the Duplicati web interface.

1 Like

Perfect understand
But the problem is that the account that accesses the folder is not local but it corresponds to a registered NAS account and stored in the Windows Credentials Warehouse.

image

The mapped drive in the previous screenshot (Z:) is available only for the user who created the drive mapping. If the Duplicati service is started using another account, Z: is not available.
Shared folders in the local network cannot be browsed using the integrated file picker. If the account used for starting the service has permissions to read the shared folder, add the UNC manually:

image

Please forgive me if I’m misunderstanding this, but is it possible we’re getting confused regarding the various credentials being discussed?


When running Duplicati as a service and wanting to user mapped network drives, the “Log On” for the Duplicati service has to have access be a computer user that has access to the declaration of the mapped drive (though not necessarily the TARGET of the mapped drive).
image


When connecting to a local (or LAN) folder or drive, the TARGET of a mapped drive might require authentication (but have nothing to do with the local computer login) and that’s what the Username and Password are for in the “Backup destination” section of the Source setup.
image

Sorry but I had not explained before
The source of the files to be backed up is in a NAS disk (DLINK DNS-320), in the administration of this NAS disk a user is configured who has access to the folder where the files are, Duplicati is installed in a Windows 7 system , a network unit is mapped to the NAS disk and connected to other credentials, the credentials of the NAS disk user are used, normally User = “10.3.107.17 \ nas1_user” and the password, this user is not a local user nor domain user. 10.3.107.17 corresponds to the IP of the NAS disk.
The destination of the files is a connection to Google Drive.

The destination
image

It says: The route does not seem to exist, do you want to add anyway?

My apologies - you did explain it correctly the first time, I just didn’t read your post closely enough. But I think I understand now - the problem is with a mapped drive as the SOURCE, not as the destination.

I believe kees-z’s answer is correct - you need to either run Duplicati as the user who mapped the Z: drive or you need to add the Z: drive mapping to the user the Duplicati IS running as.


Change Service User

If Duplicati is running as a service, then the “Duplicati service Properties (Local Computer)” image in my previous post is where you can update “This account” to be the user for whom drive Z: was mapped.


Add access to LOCALSYSTEM (hack)

I believe it is possible to give the LOCALSYSTEM account a mapped drive, but it will then be usable by everybody on the computer. So if you give LOCALSYSTEM a mapped Z: drive when you log in as your normal user you will have that Z: drive.


Dynamic mapped pre/post script drive (hack)

  1. Create a batch file with something like this:
    net use V: "\\10.3.10.17\" "myPassword" /USER:"\\10.3.10.17\nas1_informatica" /PERSISTENT:YES
  2. Create a batch file with something like this:
    net use V: /DELETE
  3. In your Duplicati job add a --run-script-before parameter that points to the first script and a --run-script-after parameter that points to the second script.

(Note that while the backup is running it’s possible other users on the machine will have access to the V: drive, I’m not sure.)


Dynamic mapped drive batch file & Task Manager (hack)

Other options include not running Duplicati as a service and instead using the Windows Task manager to run a batch file which would:

  1. map the drive (with something like net use Z: "\\10.3.10.17\" [password] /USER:"\\10.3.10.17\nas1_informatica"
  2. run the Duplicati backup as a commandline call
  3. remove the mapped drive (with something like net use Z: /DELETE
1 Like

I have tried this option but it doesn’t work for me. I have several folders on my NAS mapped to different drive letters. The first thing that is strange (though to my advantage) is that duplicati.service was able to access one of these mapped network drives even when it was still running as LOCALSYSTEM. Then I tried to give it access to the other drives as well by having it log in with my windows account (the one I’m using now and with which I can definitely see and access all those drives). I restarted the service, refreshed the browser, but the available drive letters available as a source in duplicati doesn’t change at all.

TBH, I don’t really want to try the hacks, so I wonder what might be wrong? Does it matter that I have another backup job running at the moment?

For setting up a job Source or Destination I doubt a running task would have any effect.

I would need to dig a bit further but I know scheduled tasks have a feature called something like “allow interaction with the desktop” which I think is needed for a task running as user X to get the shares defined for user X. Maybe there is a similar thing for services…

Not sure I understand. Do you mean this option under Local System account? (borrowing your screenshot from above):

https://forum.duplicati.com/uploads/default/original/1X/fb43e2c730517fc38e8a1100caa191b208e138ac.png

That option is only available for the Local System account. I suppose because other accounts will be allowed to interact with desktop anyway.

That makes sense. Sorry, I was going by months old memory there - guess it was a dead end.

There’s one more hack I haven’t tested yet but since it sounds like you want to avoid those you might just have to wait for it (authenticated mapped drive as a source) to be added as a supported feature.

Aha, so this is not really supported? Or do you mean support for unmapped network resource?

Anyway, things have gone from bad to worse overnight: I had my computer running over night to let it finish that backup and this morning, I find that the duplicati tray icon has turned red and all my backup jobs have disappeared.

So it looks like when I change the user under which the duplicati service is running I need to change something else too so that it doesn’t lose access to it’s backup jobs?

If commandline option --server-datafolder is not used and Duplicati is not running in portable mode, config files are stored in a folder named Duplicati, located under %APPDATA% or %LOCALAPPDATA%. These folders are usually C:\Users\<username>\AppData\Roaming and C:\Users\<username>\AppData\Local. For the special LOCAL SYSTEM account, the base folder is C:\Windows\System32\config\systemprofile.

To migrate backup jobs and settings, stop the Duplicati instance and copy the contents of the Duplicati folder from the source base folder to the Duplicati folder of the current account.

2 Likes

Okay, that looks good. Will try it when I’m back at my desk. In the meantime, I wonder why my backups didn’t disappear right away when I restarted the service under a different account?

All I can think of:

  • --server-datafolder is specified as a startup option for Duplicati.Server.exe, Duplicati.GUI.TrayIcon.exe or the Windows service.
  • You are running Duplicati in portable mode using the --portable-mode commandline option.
  • You already copied over the Duplicati folder.

(Note: in my previous post, of course I meant --server-datafolder instead of --dbpath. Edited my previous post to avoid confusion).

1 Like

None of the proposed options is the case (unless one of them is a default option).

Thanks for fixing the -dbpath option. Potentially saved me two hours of almost going insane…

In my case I didn’t find anything in the Roaming branch. But I copied over the contents of C:\Windows\System32\config\systemprofile\AppData\Local\Duplicati\ to C:\Users\<username>\AppData\Local\Duplicati\ (after I stopped the duplicati service, just in case). After I restarted the service, I accessed the UI and was greeted by this:

image

But now things seem to work fine after that so it’s probably nothing important. It also asked me to repair the database because it found more remote files than it knew of, so I assume that when I changed the account of the service, the running backup job just went on writing the uploaded file names into a new database so that the “old” one which I transferred was incomplete. Maybe duplicati could be made to issue some warning when something like that happens (i.e. when it suddenly finds itself writing to an empty database in the middle of a job? But if that’s not worth the effort, I can see why.

However, back to the main point of this topic: “cannot access network folder”. Now that I have duplicati service running under my windows user account, I still cannot see the other mapped network drives (only one of them). I can, however access it via its UNC path \\NAS\media\. Don’t know if that might have worked even for the system user.

Actually, something is very strange here, because according to what I read in this topic, the service shouldn’t have been able to access the first network drive at all, since, I believe, only my user account has access to it. But I’m anything else but a network wizard, so I may be wrong.

What I know, however, is that I cannot access my wife’s network folder from my windows account, so duplicati service, which is now running under that account, will probably not be able to access it either (though I wouldn’t be surprised if it works, because nothing really makes any sense anyway…). So yet another question is: can I backup that folder? More generally: how can I backup two network folders with two different access credentials?

You might be able to create a “C:\All-My-Backup-Sources” folder then put symlinks / hardlinks in them to the remote machines…

But there are all sorts of things to be wary of with this sort of setup. For example, if the backup runs on your machine but your wife’s machine is offline then Duplicati will consider all of her stuff to have been “deleted” and flag it as such in the backups.

Depending on your retention settings this could cause an unexpected removal of a file from the backup along with re-backup of the file when the link comes back.


Is there a particular reason you’re wanting to run Duplicati in a single place rather than at each of the potential backup source machines?

Dies hier sollte die Lösung bringen: [How To Use MS Windows Network Share Folders With Duplicati 2 Running As A Service](https://Access Windows Mapped Network Drive running Duplicati as Service)