Repository navigation
Closed
Labels
C-bugCategory: Something isn't working as expectedCategory: Something isn't working as expected
Description
Hi,
I installed rustic like (ubuntu 24.04):
cargo install rustic-rs --locked --features mount
versions:
- rustic v0.10.3
- fusermount3 3.14.0
Following the documentation I created a /mnt/rustic folder with local users ownership, and did:
$ rustic mount /mnt/rustic [±1e0f4a5 ●]
[INFO] using config /XXX/.config/rustic/rustic.toml
[INFO] repository local:/mnt/NAS/rustic_bkp: password is correct.
[INFO] using cache at /XXX/.cache/rustic/6925698cc7a9495ae24b770863b0449aad0914bddd0cb1efa7fttt2d26b9ef56
[00:00:00] reading index... ████████████████████████████████████████ 31/31 [00:00:00] getting snapshots... ████████████████████████████████████████ 2/2 [INFO] Mounting /mnt/rustic
error: fusermount3: unknown option ' allow_other'
it seems that there is an extra leading white space (before allow_other) that breaks my fusermount3 command.
doing:
strace -f -e execve rustic mount /mnt/rustic | grep fusermount3
I got:
`execve("/usr/bin/fusermount3", ["fusermount3", "-o", " allow_other,default_permissions,fsname=...", "--", "/mnt/rustic"], ...)
So it looks like the mount options are being passed as a single argument "-o ..." somewhere and then re-parsed, introducing a leading whitespace (or otherwise mangling the argv).
here is a minimal fix:
- passing -o and the option string as two separate argv tokens
- removing the default kernel_cache option (my fusermount3 rejects it as unknown)
diff --git a/src/commands/mount.rs b/src/commands/mount.rs
index 3dfc525..e091ee3 100644
--- a/src/commands/mount.rs
+++ b/src/commands/mount.rs
@@ -104,7 +104,7 @@ impl MountCmd {
Self {
path_template: Some(String::from("[{hostname}]/[{label}]/{time}")),
time_template: Some(String::from("%Y-%m-%d_%H-%M-%S")),
- options: vec![String::from("kernel_cache")],
+ options: vec![],
..Default::default()
}
}
@@ -172,9 +172,14 @@ impl MountCmd {
// join options into a single comma-delimited string and prepent "-o "
// this should be parsed just fine by fuser, here
// https://github.com/cberner/fuser/blob/9f6ced73a36f1d99846e28be9c5e4903939ee9d5/src/mnt/mount_options.rs#L157
- let opt_string = format!("-o {}", mount_options.join(","));
- mount(fs, mount_point, &[OsStr::new(&opt_string)])?;
+ let opt_string = mount_options.join(",");
+ mount(
+ fs,
+ mount_point,
+ &[OsStr::new("-o"), OsStr::new(&opt_string)],
+ )?;
+
Ok(())
}thanks!
Metadata
Metadata
Assignees
Labels
C-bugCategory: Something isn't working as expectedCategory: Something isn't working as expected
Activity
hogAlert commentedon Feb 21, 2026
Confirmation of Issue #1632: mount fails with leading whitespace in fusermount3 options (v0.11.0)
Description:
I am experiencing the same issue described in #1632. When running rustic mount on v0.11.0, the command fails because fusermount3 receives a string with a leading space. I am not using a config file. This occurs even when no environment variables are set and no -o flags are passed.
Environment:
Rustic: v0.11.0
OS: Linux (Debian Trixie)
FUSE: fusermount3 v3.17.2
Observed Behavior:
Regardless of input, the error is always:
error: fusermount3: unknown option ' allow_other'Attempted Workarounds (all failed):
fix: correct mount options (#1685)