Merge "BPA Provisioning CRD and Controller" into dev/icn-v0.1.0
[icn.git] / cmd / bpa-operator / build / bin / user_setup
diff --git a/cmd/bpa-operator/build/bin/user_setup b/cmd/bpa-operator/build/bin/user_setup
new file mode 100755 (executable)
index 0000000..1e36064
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+set -x
+
+# ensure $HOME exists and is accessible by group 0 (we don't know what the runtime UID will be)
+mkdir -p ${HOME}
+chown ${USER_UID}:0 ${HOME}
+chmod ug+rwx ${HOME}
+
+# runtime user will need to be able to self-insert in /etc/passwd
+chmod g+rw /etc/passwd
+
+# no need for this script to remain in the image after running
+rm $0