From f4d920362c7f7df3096318232ed18bcc3901cf16 Mon Sep 17 00:00:00 2001 From: Ilya Terentyev Date: Wed, 22 Jul 2015 20:13:01 +0300 Subject: [PATCH] Check write permissions to plugin folder During plugin installation, check if required write permissions are in place; if the sanity check fails, warn the user. This is a squash 4-in-1 commit. --- scripts/install_plugins.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/install_plugins.sh b/scripts/install_plugins.sh index 795dd8d..29aefe2 100755 --- a/scripts/install_plugins.sh +++ b/scripts/install_plugins.sh @@ -47,10 +47,17 @@ ensure_tpm_path_exists() { mkdir -p $SHARED_TPM_PATH } +verify_tpm_path_permissions() { + # check the write permission flag for all users to ensure + # that we have proper access + [ -w $SHARED_TPM_PATH ] || echo_message "$SHARED_TPM_PATH does not seem to be writable!" +} + main() { reload_tmux_environment shared_set_tpm_path_constant ensure_tpm_path_exists + verify_tpm_path_permissions install_plugins reload_tmux_environment end_message