From cecddb7388b7d255d0b248b076af2307580b2c20 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 30 Jul 2012 13:04:15 -0700 Subject: [PATCH] Change permissions when the console owner changes --- CU2/handle-console-change.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 CU2/handle-console-change.sh diff --git a/CU2/handle-console-change.sh b/CU2/handle-console-change.sh new file mode 100755 index 0000000..3ff82fe --- /dev/null +++ b/CU2/handle-console-change.sh @@ -0,0 +1,10 @@ +#! /bin/sh + +. ./common.inc + +eval $(stat -s /dev/console) || exit 1 +mkdir -p "$DNSCRYPT_BASE_DIR" || exit 1 +chown -R 0:0 "$DNSCRYPT_BASE_DIR" +chown -R "${st_uid}:0" "$CONTROL_DIR" +find "$DNSCRYPT_BASE_DIR" -type d -exec chmod 755 {} \; +