From 63aa0446a0b50ed1caf5771f7959f7e1d5ad7f3d Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Sun, 9 Feb 2020 11:19:15 +0100 Subject: [scripts/mount-store] Make stage4 owned by dnbd3 user --- scripts/mount-store | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/mount-store b/scripts/mount-store index 430e9a3..8ba2a42 100755 --- a/scripts/mount-store +++ b/scripts/mount-store @@ -65,15 +65,15 @@ storage_test () { echo "Error: Mounted share is not writable." >&2 ls -al "${DEST}" "${SUBDIR}" >&2 fi - # HACK: make sure $DEST/stage4 is writable for dnbd3 user - mkdir -p "$DNBDDIR" + echo "Applying permissions for stage4 directory..." + mkdir -p "${DNBDDIR}" if [ ! -d "${DNBDDIR}" ]; then echo "Error: Could not create directory $(basename "${DNBDDIR}")! Storage not writable!" >&2 return 6 fi - find "${DNBDDIR}" -type d -exec chgrp dnbd3 {} \; 2>/dev/null + find "${DNBDDIR}" -type d -exec chown dnbd3:dnbd3 {} \; 2>/dev/null find "${DNBDDIR}" -type d -exec chmod ug+rwx {} \; 2>/dev/null - # END HACK + # TODO: touch and rm like above... return $RET } -- cgit v1.2.3-55-g7522