aboutsummaryrefslogtreecommitdiff
path: root/src/dotnet/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/dotnet/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/dotnet/install.sh')
-rw-r--r--src/dotnet/install.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/dotnet/install.sh b/src/dotnet/install.sh
index 0a147bc..9484bbe 100644
--- a/src/dotnet/install.sh
+++ b/src/dotnet/install.sh
@@ -412,7 +412,16 @@ else
echo "Could not install dotnet from apt. Attempting to install dotnet from releases url"
fi
+ if ! cat /etc/group | grep -e "^dotnet:" > /dev/null 2>&1; then
+ groupadd -r dotnet
+ fi
+ usermod -a -G dotnet "${USERNAME}"
+
install_using_dotnet_releases_url "${DOTNET_SDK_OR_RUNTIME}"
+
+ chown -R :dotnet "${TARGET_DOTNET_ROOT}"
+ chmod -R g+r+w "${TARGET_DOTNET_ROOT}"
+ find "${TARGET_DOTNET_ROOT}" -type d | xargs -n 1 chmod g+s
fi
echo "Done!" \ No newline at end of file