diff options
author | Simon Rettberg | 2020-02-09 11:19:15 +0100 |
---|---|---|
committer | Simon Rettberg | 2020-02-09 11:19:15 +0100 |
commit | 63aa0446a0b50ed1caf5771f7959f7e1d5ad7f3d (patch) | |
tree | fecb127abe974ec0573dd652121e7258e94a16af | |
parent | [Symlink] And don't follow symlinks when checking if file exists (diff) | |
download | tmlite-bwlp-3.9.tar.gz tmlite-bwlp-3.9.tar.xz tmlite-bwlp-3.9.zip |
[scripts/mount-store] Make stage4 owned by dnbd3 userv3.9
-rwxr-xr-x | scripts/mount-store | 8 |
1 files 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 } |