force user and group on bindfs

This commit is contained in:
2022-09-16 12:00:28 +02:00
parent 3c27d8662d
commit 6a59888e18
+2 -2
View File
@@ -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]