From: kremlin Date: Sat, 11 Feb 2017 04:41:32 +0000 (-0600) Subject: add system source directory permission setting script X-Git-Url: https://uglyman.kremlin.cc/gitweb/gitweb.cgi?a=commitdiff_plain;h=40fb98b7b84c3d97eeae26a91cf215c3deac1ce3;p=bbb-usb.git add system source directory permission setting script --- diff --git a/misc/perms.sh b/misc/perms.sh new file mode 100755 index 0000000..db63db2 --- /dev/null +++ b/misc/perms.sh @@ -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 " + exit 2 +fi + +set -e +chgrp -G wsrc $1 +chmod -R g+rwx /usr/src + +echo "permissions set -- relogin" +