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
This happens, if the filesystem where dotnet-sdk is installed, is mounted read-only like on NixOS.
To reproduce,
mark AppHostTemplate/apphost as read-only on your dotnet-sdk installation.
dotnet tool install -g dotnetsay
Failed to create shell shim for tool 'dotnetsay': Failed to create tool shim for command 'dotnetsay': Access to the path '/home/bara/.dotnet/tools/dotnetsay' is denied.
Tool 'dotnetsay' failed to install.
Running it with strace, I see that the readonly permissions of the original file are applied, then the file is opened in read-write mode, which fails:
I need to understand more on why NixOS will it mount as read only. And could you tell me how you get the SDK in detail? Like you install it via tar.gz and then mount it or there is a different package manager.
Many components in SDK are permission sensitive, and they have correct permission when using existing official supported method like apt-get, rpm, tar.gz and download script.
Nix strives to make building packages reproducible. It stores packages in /nix/store according to hash of its inputs (hash of dependencies + hash of source files). The files are read-only to prevent user errors and find problems, where installed programs modify their files, which could prevent reproducible builds.
There is a section in the manual for more overview: https://nixos.org/nix/manual/#ch-about-nix
Steps to reproduce
This happens, if the filesystem where dotnet-sdk is installed, is mounted read-only like on NixOS.
To reproduce,
mark
AppHostTemplate/apphost
as read-only on your dotnet-sdk installation.Expected behavior
dotnet tool install -g dotnetsay
install the toolActual behavior
Running it with
strace
, I see that the readonly permissions of the original file are applied, then the file is opened in read-write mode, which fails:Environment data
dotnet --info
output:The text was updated successfully, but these errors were encountered: