You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
Failing to upgrade from actions/setup-dotnet@v2 to actions/[email protected] with error of Permission Denied
Task version:
v3.0.3
Platform:
Ubuntu
macOS
Windows
Runner type:
Hosted
Self-hosted
Repro steps:
Upgrade from actions/setup-dotnet@v2 to actions/[email protected]
Expected behavior:
Continue working without errors as it was with version 2.
Actual behavior:
--> With Error
When the upgrade from actions/setup-dotnet@v2 to actions/[email protected] is used the following errors occur:
> Run actions/[email protected]
with:
dotnet-version: 6.0.x
/opt/actions-runner/_work/_actions/actions/setup-dotnet/v3.0.3/externals/install-dotnet.sh --channel 6.0
dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.
dotnet-install: Attempting to download using aka.ms link https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.403/dotnet-sdk-6.0.403-linux-x64.tar.gz
dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.403/dotnet-sdk-6.0.403-linux-x64.tar.gz
cp: cannot create directory '/usr/share/dotnet/host/fxr/6.0.11/': Permission denied
cp: cannot create directory '/usr/share/dotnet/packs/Microsoft.AspNetCore.App.Ref/6.0.11/': Permission denied
cp: cannot create directory '/usr/share/dotnet/packs/Microsoft.NETCore.App.Host.linux-x64/6.0.11/': Permission denied
cp: cannot create directory '/usr/share/dotnet/packs/Microsoft.NETCore.App.Ref/6.0.11/': Permission denied
mkdir: cannot create directory ‘/usr/share/dotnet/sdk-manifests’: Permission denied
cp: cannot create directory '/usr/share/dotnet/sdk-manifests/6.0.300/': No such file or directory
cp: cannot create directory '/usr/share/dotnet/sdk/6.0.403/': Permission denied
mkdir: cannot create directory ‘/usr/share/dotnet/sdk/6.0.403’: Permission denied
cp: cannot create directory '/usr/share/dotnet/sdk/6.0.403/DotnetTools/dotnet-dev-certs/6.0.11-servicing.[2](https://github.com/Intelliflo/github-actions/actions/runs/3362525391/jobs/5709512855#step:3:2)252[3](https://github.com/Intelliflo/github-actions/actions/runs/3362525391/jobs/5709512855#step:3:3).[4](https://github.com/Intelliflo/github-actions/actions/runs/3362525391/jobs/5709512855#step:3:5)/': No such file or directory
mkdir: cannot create directory ‘/usr/share/dotnet/sdk/6.0.403’: Permission denied
cp: cannot create directory '/usr/share/dotnet/sdk/6.0.403/DotnetTools/dotnet-user-secrets/6.0.11-servicing.22[5](https://github.com/Intelliflo/github-actions/actions/runs/3362525391/jobs/5709512855#step:3:6)23.4/': No such file or directory
mkdir: cannot create directory ‘/usr/share/dotnet/sdk/[6](https://github.com/Intelliflo/github-actions/actions/runs/3362525391/jobs/5709512855#step:3:7).0.403’: Permission denied
cp: cannot create directory '/usr/share/dotnet/sdk/6.0.403/DotnetTools/dotnet-watch/6.0.403-servicing.22523.23/': No such file or directory
cp: cannot create directory '/usr/share/dotnet/shared/Microsoft.AspNetCore.App/6.0.11/': Permission denied
cp: cannot create directory '/usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.11/': Permission denied
cp: cannot create directory '/usr/share/dotnet/templates/6.0.11/': Permission denied
cp: cannot create regular file '/usr/share/dotnet/dotnet': Permission denied
cp: cannot create regular file '/usr/share/dotnet/ThirdPartyNotices.txt': Permission denied
cp: cannot create regular file '/usr/share/dotnet/LICENSE.txt': Permission denied
dotnet_install: Error: Failed to verify the version of installed `.NET Core SDK`.
Installation source: https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.403/dotnet-sdk-6.0.403-linux-x64.tar.gz.
Installation location: /usr/share/dotnet.
Report the bug at https://github.com/dotnet/install-scripts/issues.
dotnet_install: Error: `.NET Core SDK` with version = 6.0.403 failed to install with an error.
Error: Failed to install dotnet 1. dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.
dotnet-install: Attempting to download using aka.ms link https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.403/dotnet-sdk-6.0.403-linux-x64.tar.gz
dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.403/dotnet-sdk-6.0.403-linux-x64.tar.gz
--> Without Error
With version 2, the same step:
> Run actions/setup-dotnet@v[2](https://github.com/Intelliflo/github-actions/actions/runs/3426673822/jobs/5708760078#step:3:2)
with:
dotnet-version: 6.0.x
include-prerelease: false
/opt/actions-runner/_work/_actions/actions/setup-dotnet/v2/externals/install-dotnet.sh --version 6.0.40[3](https://github.com/Intelliflo/github-actions/actions/runs/3426673822/jobs/5708760078#step:3:3)
dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.
dotnet-install: Attempting to download using primary link https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.[4](https://github.com/Intelliflo/github-actions/actions/runs/3426673822/jobs/5708760078#step:3:4)03/dotnet-sdk-[6](https://github.com/Intelliflo/github-actions/actions/runs/3426673822/jobs/5708760078#step:3:7).0.403-linux-x64.tar.gz
dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.403/dotnet-sdk-6.0.403-linux-x64.tar.gz
dotnet-install: Installed version is 6.0.403
dotnet-install: Adding to current process PATH: `/home/runners/.dotnet`. Note: This change will be visible only when sourcing script.
dotnet-install: Note that the script does not resolve dependencies during installation.
dotnet-install: To check the list of dependencies, go to https://docs.microsoft.com/dotnet/core/install, select your operating system and check the "Dependencies" section.
dotnet-install: Installation finished successfully.
/home/runners/.dotnet:/home/runners/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
The text was updated successfully, but these errors were encountered:
Hi, @mj-dias 👋 Thanks for the issue! In the third version of the actions the place where the action installs .NET SDKs was changed. As I see from the logs you provided, the user that you're using doesn't have permission to write to this folder. There are two ways to solve this problem: 1) Get permissions for your user to write to /usr/share/dotnet; 2) Use env.variable DOTNET_INSTALL_DIR to set that folder, where you have permission to write, like it's stated in README.md:
Description:
Failing to upgrade from
actions/setup-dotnet@v2
toactions/[email protected]
with error of Permission DeniedTask version:
v3.0.3
Platform:
Runner type:
Repro steps:
Upgrade from
actions/setup-dotnet@v2
toactions/[email protected]
Expected behavior:
Continue working without errors as it was with version 2.
Actual behavior:
--> With Error
When the upgrade from
actions/setup-dotnet@v2
toactions/[email protected]
is used the following errors occur:--> Without Error
With version 2, the same step:
The text was updated successfully, but these errors were encountered: