Commit Graph
9 Commits
Author SHA1 Message Date
Kenneth Skovhede e9af50f9ac Added minor code cleanup
- Added missing cultureinformation on some date/time strings
- Added a check if a file exists to avoid an exception when probing for datafolder files
- Fixed a string that should be a constant
- Fixed a dirseparator append
- Fixed places where the exception message was logged into the log message itself creating double data
2026-01-23 11:43:59 +01:00
Kenneth Skovhede fc478146f3 Update ServerUtil probing
This PR updates the probing logic to not try the database if a password is supplied on the commandline.

It also fixes a crash that could happen at an unwanted place, if the user does not have write access to the supplied data folder. After this, the application will still crash due to not having  a place to write information, but it does not crash in the preloader logic. This also prevents creating the folder while probing for the database.

This PR also fixes a case where the database could become encrypted, if the ServerUtil was providing an encryption key to an unencrypted database. Before this fix, the database would be encrypted with the key provided to ServerUtil, which would most likely cause the Server/TrayIcon to fail starting and perhaps crash.

This fixes #6377
2025-07-10 21:03:16 +02:00
Marcelo C. bf22d7e178 Changed parameter from boolean to Enum for clarity of purpose 2025-04-02 10:15:21 -03:00
Marcelo C. 2da12c12bb Refactoring of how permissions are set whilst obtaining DataFolder
This addresses [Issue](https://github.com/duplicati/duplicati/issues/6114).

Whenever in non-write context, the permissions of the folder are not set.

Changing pattern from static constructor execution.
2025-04-01 15:21:40 -03:00
Kenneth Skovhede e2df06b8f5 Guards for setting permissions
When setting the permissions, this does not crash the process if it fails, but emits a warning.
2025-03-31 16:07:50 +02:00
Kenneth Skovhede f0f79418d8 Fixed logic so the permissions are always applied, unless the user specifically opts out by placing a file named insecure-permissions.txt in the data folder. 2025-02-06 17:09:18 +01:00
Kenneth Skovhede aab91eb0df Added protection to newly create data folder and databases 2025-02-06 16:56:06 +01:00
Kenneth Skovhede de00eee3de Changed logic so overrides to server-datafolder will affect any operation, including CLI, Agent, and ServerUtil 2025-01-28 13:23:57 +01:00
Kenneth Skovhede fac12ba772 Further consolidated the data folder.
Added support for `--portable-mode` and `--server-datafolder` for the CLI, ServerUtil, and Agent.

Fixed a few places where file reads were not cached properly.

Moved some responsibilities of UpdaterManager into DataFolderManager.

This now supports storing `machineid.txt` and `installation.txt` inside the path pointed to by `--server-datafolder` or alternatively with `--portable-mode`.

It is possible that some fringe backwards compatibility is lost with this update.

Fixed an issue with AutoUpdater crashing on check/download.

This fixes #5902
2025-01-28 13:01:35 +01:00