summaryrefslogtreecommitdiffstats
path: root/.local/bin/mounter
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2023-02-17 10:17:35 -0500
committerLuke Smith <luke@lukesmith.xyz>2023-02-17 10:17:35 -0500
commit185ac25e52069cab8144d0aea820c056544dfec2 (patch)
tree72e9704c41ed405aa3049d92314f662620d1e63b /.local/bin/mounter
parent335c1bc8affbe8cb6afbd1148c73caa1796617b0 (diff)
downloadeibhear-185ac25e52069cab8144d0aea820c056544dfec2.tar.gz
eibhear-185ac25e52069cab8144d0aea820c056544dfec2.tar.zst
eibhear-185ac25e52069cab8144d0aea820c056544dfec2.zip
mount drives with user's ownership
Diffstat (limited to '.local/bin/mounter')
-rwxr-xr-x.local/bin/mounter4
1 files changed, 2 insertions, 2 deletions
diff --git a/.local/bin/mounter b/.local/bin/mounter
index d7c1b06..059043b 100755
--- a/.local/bin/mounter
+++ b/.local/bin/mounter
@@ -59,7 +59,7 @@ case "$chosen" in
chosen="${chosen%% *}"
chosen="${chosen:1}" # This is a bashism.
getmount
- sudo -A mount "$chosen" "$mp"
+ sudo -A mount "$chosen" "$mp" -o uid="$(id -u)",gid="$(id -g)"
notify-send "💾Drive Mounted." "$chosen mounted to $mp."
;;
@@ -78,7 +78,7 @@ case "$chosen" in
test -b "/dev/mapper/usb$num"
getmount
- sudo -A mount "/dev/mapper/usb$num" "$mp"
+ sudo -A mount "/dev/mapper/usb$num" "$mp" -o uid="$(id -u)",gid="$(id -g)"
notify-send "🔓Decrypted drive Mounted." "$chosen decrypted and mounted to $mp."
;;