New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"dotnet" commands have permission issues #9649
Comments
Looks like deleting the "NuGetFallbackFolder" fixed the issue. Any idea what the problem was? |
how did you install SDK via tar.gz or apt-get? install via tar.gz might have this problem when you did not run it with sudo when the location is a sudo location. |
I used the macOS "Installer" from: https://www.microsoft.com/net/download/dotnet-core/2.1. I think it had a .pkg extension. |
I'm facing the same error on ubuntu updating to apt-git. I renamed the folder to NuGetfallbackFolder.bak, and the SDK still complains about it but allows me to continue |
@JRKoch @mrlife it should be some permission mismatch. The end goal is expand nugetfallbackfolder with correct permission. To fix it, you could run any dotnet command other than help/info with sudo. However, i am still investigating why this issue happens in the first place. 1. fallbackfolder should expand during installer with sudo. Did it get interrupted? 2. when it find no permission to expand, SDK should try to expand it under ~/.dotnet folder |
Similar issue here, but on Windows |
It didn’t get interrupted in my case. I am facing it on two Ubuntu
installs, both running 18.04 upgraded from 17.10. And both had the dotnet
2.1 preview installed and have been kept up to date via the apt
repositories.
…On Wed, Aug 15, 2018 at 11:14 AM William Li ***@***.***> wrote:
Similar issue here, but on Windows
dotnet/cli#9842 <https://github.com/dotnet/cli/issues/9842>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/dotnet/cli/issues/9807#issuecomment-413286418>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AEbwK5pzvIpl3J_ysOYqfIIkqY6ScQ9Kks5uRGT9gaJpZM4V2Q2j>
.
|
Responding to questions on other issue @livarcocc:
Msi install
In the installer? Yes.
No, it is not set. |
Also happening on a brand new MacOS system, first time install of latest SDK (2.1.400). Any dotnet command results in:
The sdk was installed from the MacOS package installer on a fresh system. I tried using a 'sudo dotnet' command but now I'm getting multiple exceptions:
|
Well, turns out it looks like it was the install of Trend Micro Antivirus. I had the IT department uninstall it and the sudo tool command went through without a problem.... |
If you follow the advice and run build as root using sudo once then your obj/bin folders will be owned by root and your normal build will fail. Please fix this properly, building should never!!! ever require admin rights, this is so very, very, very wrong. This cache should be in a location and with permissions that non sudo users can access. |
I faced the similar issue on Windows 7 laptop where the dotnet commands were running successfully. This problem appeared suddenly. When I tried to run the same command in Administrator mode as described, packages cache got updated. So package cache management is the culprit? Configuring...A command is running to populate your local package cache to improve restore spe The dotnet.exe is executing well once the cache population is completed. |
I received this error because I set my Environment to production (to try fix another issue). The below fixed it for me On Linux MacOS and Windows see |
This worked for me, the problem started after the update to dotnet core 2.2. I'm using Windows 10. |
I am too facing the same error. I have a newly configured ubuntu machine and after running:
and
I get the following output error in both cases:
Here is my kernel version: Here is the dotnet info:
|
I have been able to resolve my error by deleting the folder
then completely uninstalling all dotnet components
and reinstalling the dotnet-sdk2.2. Not really the way to fix the problem but it worked for me. |
I experience this issue on Linux Ubuntu 18.04.1 LTS. dotnet was installed with
|
Same issue on Windows10 with .NET Core 2.2.104. I deleted the |
Same issue for me, this happened to me right after I added the "Desktop environment for C++" workload to my VS2017 install. Maybe that messed with some permissions for that folder or it's ownership? In my case I uninstalled all |
I started having this issue on Win10 after updating to .NET core 2.2.203 from a previous 2.2 install (I'm not sure which but I think it was 2.2.104). I installed the SDK via the installer found on http://dot.net To make the error go away I ran powershell as admin, killed all .NET process, VS Code, etc, and ran a |
How to Kill all .net Process? |
@asmaa3107 on windows: If there are no |
On Windows, changing permissions on |
I've updated to the latest sdk 2.2.301 and the error still occurs. For me the error only occures while trying to run a dotnet tool. |
i give all permissions to a folder /usr/share/dotnet/sdk/NuGetFallbackFolder |
@HusseinElGanzory Thanks, however for the developers, it is extremely wrong that this is necessary, 777 is a extreme nuke it from orbit approach with very serious security implications. There is no world in which it is OK for a build to by default require root access, ever, this should be a very high priority fix, the fact this issue still persists after 11 months is very concerning. |
I have a similar issue under Ubuntu 18.10 This is not a fix, but is only being provided as additional information for anyone who might find it useful. When issuing a build command on the command line, I would receive two messages:
The path located at When investigating, I noticed that ownership for the HTH |
I was trying to deploy an ASP.net core app to Azure and had this error in my stdoutLogfile. |
Steps to reproduce
run
dotnet clean
,dotnet restore
,dotnet build
, ordotnet publish
Expected behavior
The command should complete without error
Actual behavior
Here is the error:
Environment data
dotnet --info
output:The text was updated successfully, but these errors were encountered: