Closed nakamuray closed 3 months ago
Fallback to from_defined_mounts(...) path to find snapshots if user don't have root privilege.
In principle, I don't have a problem doing this, but let me work up a branch and make sure it doesn't complicate anything else.
The only issue I can imagine is this makes error handling more confusing. Like -- you're using btrfs, and httm
isn't working. Why? Well, maybe we've skipped all the error messages/paths to fallback to something else. So -- the solution is may be to continue printing an error message which indicates some fallback behavior, but only if Snapper mounts are detected.
I'll take a look.
You can try this branch with: cargo install --locked --git https://github.com/kimono-koans/httm.git --branch fallback_to_defined_mounts
Pleased to know your thoughts. Thanks!
Thanks. I've tried the branch and works as expected.
Is your feature request related to a problem? Please describe. I'm using btrfs/snapper with config
SYNC_ACL="yes"
, which make.snapshots
directory readable for my regular user account. But httm still require root privilege to list snapshots because my user can't callbtrfs subvolume show
command.Describe the solution you'd like Fallback to
from_defined_mounts(...)
path to find snapshots if user don't have root privilege. On my situation, this code path works and httm lists snapshots. (I'm using httm with a modification that always use this code path and it seems to work.)Describe alternatives you've considered Alternatively, if httm has command line option to tell it to use that code path, I could use it to get snapshots.
Additional context