commit aabf200d5527d2f9729323d9e2e4da05fd2023b7 parent 611e60c3fa58fecc10a821d5b4e1d77eca5528a3 Author: Marcello Stanisci <stanisci.m@gmail.com> Date: Sat, 8 Jun 2019 13:53:59 +0200 chmod'ing keys Diffstat:
| M | bin/taler-deployment-keyup | | | 14 | +++++++++++++- |
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/bin/taler-deployment-keyup b/bin/taler-deployment-keyup @@ -6,7 +6,7 @@ set -eu if test -z $TALER_CONFIG_ENV; then - echo Please run 'source ~/activate' first. + echo Please run 'source $HOME/activate' first. exit 1 fi @@ -14,12 +14,19 @@ AUDITOR_REQUEST_DIR=$(taler-config -s exchange -o autitor_inputs -f) AUDITOR_BASE_DIR=$(taler-config -s exchangedb -o autitor_base_dir -f) EXHCANGE_PUB=$(taler-config -s exchange -o master_public_key) EXHCANGE_URL=$(taler-config -s exchange -o base_url) +EXCHANGE_LIVE_KEYS=$(taler-config -s -o keydir -f) mkdir -p $auditor_request_dir taler-exchange-keyup \ -m $(taler-config -s exchange -o master_priv_file -f) \ -o $AUDITOR_REQUEST_DIR/auditor_request + +# or-ing with true as user A won't be able to +# change permissions for user B's files. +chgrp -R $TALER_CONFIG_ENV $EXCHANGE_LIVE_KEYS/* || true +chmod -R 070 $EXCHANGE_LIVE_KEYS/* || true + taler-auditor-exchange \ -m $EXCHANGE_PUB \ -u $EXCHANGE_URL @@ -35,3 +42,8 @@ if [[ -s $auditor_request_dir/auditor_request ]]; then -o "$AUDITOR_BASE_DIR/$(date +%s%N)" \ -c ${HOME}/.config/taler.conf fi + +# or-ing with true as user A won't be able to +# change permissions for user B's files. +chgrp -R $TALER_CONFIG_ENV $AUDITOR_BASE_DIR/* || true +chmod -R 070 $AUDITOR_BASE_DIR/* || true