From 661aa8d363d0f7af4826a1f3f1900fae79af8e05 Mon Sep 17 00:00:00 2001 From: David Greaves Date: Mon, 18 May 2015 21:26:20 +0100 Subject: [PATCH] [mount-sd] Ensure media root dir is owned by the user : Fixes MB#1010 Ensure the root dir of any linuxy SD is owned by the user so they can, you know ... *write* to it :) --- scripts/mount-sd.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/mount-sd.sh b/scripts/mount-sd.sh index 59841ce..8cc7564 100755 --- a/scripts/mount-sd.sh +++ b/scripts/mount-sd.sh @@ -58,6 +58,8 @@ if [ "$ACTION" = "add" ]; then ;; *) mount ${DEVNAME} $MNT/${UUID} -o $MOUNT_OPTS || /bin/rmdir $MNT/${UUID} + # Ensure the root dir of any linuxy SD is owned by the user + chown $DEF_UID:$DEF_GID $MNT $MNT/${UUID} ;; esac test -d $MNT/${UUID} && touch $MNT/${UUID}