ts678
April 24, 2025, 2:28pm
16
What changed since when you ran change-password
in it and got a surprising path?
The problem you see now is probably a not-yet-claimed-fixed probably build problem.
opened 06:55PM - 08 Mar 25 UTC
bug
- **Duplicati version**: 2.1.0.5 (arm64-gui)
- **Operating system**: Ubuntu 24.0… 4 LTS (Armbian)
- **Backend**: local
## Description
Installed fresh on Armbian Ubuntu 24.04 and when I try to change password, I got a crash (with command sudo duplicati-server-util change-password). I´ve tested in another server (x64 version) which I've upgraded from Duplicati Beta to 2.1.0.5 and the same thing is happening (was working fine before).
## Steps to reproduce
sudo duplicati-server-util change-password
- **Actual result**:
> Crash!
> System.IO.FileNotFoundException: Could not load file or assembly 'System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
>
> File name: 'System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
> at Duplicati.CommandLine.ServerUtil.Program.Main(String[] args)
> at Duplicati.CommandLine.ServerUtil.Net8.Program.<>c__DisplayClass0_0.<Main>b__0()
> at Duplicati.Library.Crashlog.CrashlogHelper.WrapWithCrashLog[T](Func`1 method, String logdir, String applicationName)
> Failed to write crashlog: System.UnauthorizedAccessException: Access to the path '/tmp/Duplicati.CommandLine.ServerUtil-crashlog.txt' is denied.
> ---> System.IO.IOException: Permission denied
> --- End of inner exception stack trace ---
> at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
> at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
> at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
> at System.IO.File.WriteToFile(String path, FileMode mode, String contents, Encoding encoding)
> at Duplicati.Library.Crashlog.CrashlogHelper.LogCrashException(Exception ex, String logdir, String applicationName)
> Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
>
> File name: 'System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
> at Duplicati.CommandLine.ServerUtil.Program.Main(String[] args)
> at Duplicati.CommandLine.ServerUtil.Net8.Program.<>c__DisplayClass0_0.<Main>b__0()
> at Duplicati.Library.Crashlog.CrashlogHelper.WrapWithCrashLog[T](Func`1 method, String logdir, String applicationName)
> at Duplicati.CommandLine.ServerUtil.Net8.Program.<Main>(String[] args)
> Aborted
- **Expected result**:
Just to prompt for password change.
Despite the need for the file, the MacOS and Linux builds are missing this file, but the Windows builds contain it.
It should be sufficient to take it either from the 2.1.0.4 or the 2.1.0.5 Windows zip file:
On my x64 deb install, 2.1.0.5 has the missing-DLL problem, but 2.1.0.112 does not.
I glanced at multiple build fixes, but couldn’t find which fixed it, or maybe it’s random.
I recently upgraded from 2.1.0.4 stable to 2.1.0.5 stable. Unfortunately, backups stopped working. I invoke them from cron using duplicati-server-util and log the results in a file, so I was able to pull this information up and see the following exception. I tested the command against a few jobs, just to make sure it wasn’t job-specific. I also tested running the command with no job or parameters and received the same error message. I rolled back to 2.1.0.4 and have no issues.
duplicati-server-…
is the forum version of the report, and it’s interesting that 2.1.0.4 also lacks the issue.
I’m surprised we’re not hearing more reports on this from 2.1.0.5.
I did the workaround for Linux, set HOME environment to non-existent /config to test.
Surprise behavior is it seems to make a new Duplicati subfolder relative to current dir.
So change-password
in tmp makes new folder with installation.txt and machineid.txt.
This isn’t the only command going that way. duplicati
does too, but with more files:
$ pwd
/tmp
$ ls -ln Duplicati
total 80
drwxrwxr-x 2 1000 1000 4096 Apr 24 10:01 control_dir_v2
-rw------- 1 1000 1000 65536 Apr 24 10:01 Duplicati-server.sqlite
-rw-rw-r-- 1 1000 1000 283 Apr 24 10:01 installation.txt
-rw-rw-r-- 1 1000 1000 247 Apr 24 10:01 machineid.txt
$
public static string GetDefaultStorageFolder(string targetfilename, string appName = "Duplicati")
{
//Normal mode uses the systems "(Local) Application Data" folder
// %LOCALAPPDATA% on Windows, ~/.config on Linux
var folder = System.IO.Path.Combine(System.Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), appName);
is possibly the bug, as GetFolderPath returns an empty string because path isn’t there.
Append Duplicati
to the empty string, and you get relative path to Duplicati
folder.
This is probably not the intended result. Basing folder on current dir sounds very weird.