summarylogtreecommitdiffstats
path: root/fix-permissions.sh
diff options
context:
space:
mode:
Diffstat (limited to 'fix-permissions.sh')
-rw-r--r--fix-permissions.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/fix-permissions.sh b/fix-permissions.sh
new file mode 100644
index 00000000000..92de5ead3f3
--- /dev/null
+++ b/fix-permissions.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/sh
+
+_group="${1:-games}"
+
+getent group $_group &> /dev/null
+
+if [ $? != 0 ]; then
+ echo "group '$_group' not found";
+ echo "${0##/} [group] default: games"
+ exit 1
+fi
+
+# fix permissions
+chgrp $_group /opt/battle-isle/{isle,desert,moon}
+chmod g+w /opt/battle-isle/{isle,desert,moon}