From 6a59888e18391192d90b8ec1e3aebabe534d1ff6 Mon Sep 17 00:00:00 2001 From: Konrad Bucheli Date: Fri, 16 Sep 2022 12:00:28 +0200 Subject: [PATCH] force user and group on bindfs --- user-guide/firefox_profile_per_host.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user-guide/firefox_profile_per_host.md b/user-guide/firefox_profile_per_host.md index d1be6bda..25cbc69d 100644 --- a/user-guide/firefox_profile_per_host.md +++ b/user-guide/firefox_profile_per_host.md @@ -17,7 +17,7 @@ Add to the bottom of `~/.bash_profile`: ``` if ! mountpoint -q ~/.mozilla/firefox; then mkdir -p ~/.mozilla/firefox{_$(hostname --fqdn),} - bindfs -o nonempty,no-allow-other ~/.mozilla/firefox_$(hostname --fqdn) ~/.mozilla/firefox + bindfs --force-user="$(id -un)" --force-group="$(id -gn)" -o nonempty,no-allow-other ~/.mozilla/firefox_$(hostname --fqdn) ~/.mozilla/firefox fi ``` @@ -34,7 +34,7 @@ Description=Private Firefox Profile per Host [Service] Type=oneshot RemainAfterExit=true -ExecStart=bash -c 'if ! mountpoint -q "%h/.mozilla/firefox"; then mkdir -p "%h/.mozilla/firefox"{_%H,}; bindfs -o nonempty,no-allow-other "%h/.mozilla/firefox_%H" "%h/.mozilla/firefox"; fi' +ExecStart=bash -c 'if ! mountpoint -q "%h/.mozilla/firefox"; then mkdir -p "%h/.mozilla/firefox"{_%H,}; bindfs --force-user="$(id -un)" --force-group="$(id -gn)" -o nonempty,no-allow-other "%h/.mozilla/firefox_%H" "%h/.mozilla/firefox"; fi' ExecStop=fusermount -u %h/.mozilla/firefox [Install]