projects
/
bbb-usb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
20de44d
)
add system source directory permission setting script
author
kremlin
<ian@kremlin.cc>
Sat, 11 Feb 2017 04:41:32 +0000
(22:41 -0600)
committer
kremlin
<ian@kremlin.cc>
Sat, 11 Feb 2017 04:41:32 +0000
(22:41 -0600)
misc/perms.sh
[new file with mode: 0755]
patch
|
blob
diff --git a/misc/perms.sh
b/misc/perms.sh
new file mode 100755
(executable)
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 <user>"
+ exit 2
+fi
+
+set -e
+chgrp -G wsrc $1
+chmod -R g+rwx /usr/src
+
+echo "permissions set -- relogin"
+