aboutsummaryrefslogtreecommitdiff
path: root/src/ruby/install.sh
diff options
context:
space:
mode:
authorSamruddhi Khandale <skhandale@microsoft.com>2022-06-13 23:30:57 +0300
committerGitHub <noreply@github.com>2022-06-13 23:30:57 +0300
commitfa07406f4dccd482284cb9d8dbaca6533116dab8 (patch)
tree438c8fd7b17b3d69ecede41ea0bdea99fe0e4eea /src/ruby/install.sh
parent19fd66af965b22f57fd59a0ba31136146b9542d1 (diff)
add missing user groups to fix permission issues for non root user (#45)
* add missing user groups * fix username * move chmod: anaconda
Diffstat (limited to 'src/ruby/install.sh')
-rw-r--r--src/ruby/install.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/ruby/install.sh b/src/ruby/install.sh
index e68197a..ade545c 100644
--- a/src/ruby/install.sh
+++ b/src/ruby/install.sh
@@ -270,8 +270,6 @@ if [ "${SKIP_RBENV_RBUILD}" != "true" ]; then
if [ "${USERNAME}" != "root" ]; then
mkdir -p /home/${USERNAME}/.rbenv/plugins
- sudo chown -R ${USERNAME} /home/${USERNAME}/.rbenv
- sudo chown -R ${USERNAME} /usr/local/rvm/
if [[ ! -d "/home/${USERNAME}/.rbenv/plugins/ruby-build" ]]; then
ln -s /usr/local/share/ruby-build /home/${USERNAME}/.rbenv/plugins/ruby-build
@@ -279,9 +277,16 @@ if [ "${SKIP_RBENV_RBUILD}" != "true" ]; then
ln -s /usr/local/rvm/rubies/default/bin/ruby /usr/local/rvm/gems/default/bin
+ chown -R :rvm "/home/${USERNAME}/.rbenv"
+ chmod -R g+r+w "/home/${USERNAME}/.rbenv"
+ find "/home/${USERNAME}/.rbenv" -type d | xargs -n 1 chmod g+s
fi
fi
+chown -R :rvm "/usr/local/rvm"
+chmod -R g+r+w "/usr/local/rvm"
+find "/usr/local/rvm" -type d | xargs -n 1 chmod g+s
+
# Clean up
rvm cleanup all
${ROOT_GEM} cleanup