add system source directory permission setting script
authorkremlin <ian@kremlin.cc>
Sat, 11 Feb 2017 04:41:32 +0000 (22:41 -0600)
committerkremlin <ian@kremlin.cc>
Sat, 11 Feb 2017 04:41:32 +0000 (22:41 -0600)
misc/perms.sh [new file with mode: 0755]

diff --git a/misc/perms.sh b/misc/perms.sh
new file mode 100755 (executable)
index 0000000..db63db2
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/ksh
+
+EUID=`id -g`
+if [[ $EUID -ne 0 ]]; then
+       echo "run me as root!"
+       exit 1
+elif [[ ${#} -ne 2 ]]; then
+       echo "SYNTAX: perms.sh <user>"
+       exit 2
+fi
+
+set -e
+chgrp -G wsrc $1
+chmod -R g+rwx /usr/src
+
+echo "permissions set -- relogin"
+