question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Permission Denied error

See original GitHub issue

Steps to reproduce

Dans-MacBook-Air:Demo1 dansiegel$ dotnet --version
2.1.0-preview1-006723
Dans-MacBook-Air:Demo1 dansiegel$ dotnet new
Access to the path '/Users/dansiegel/.templateengine/dotnetcli/v2.1.0-preview1-006723/en-US.templatecache.json' is denied.
Permission denied

Expected behavior

I should be able to access dotnet new from the cli.

Environment data

dotnet --info output:

.NET Command Line Tools (2.1.0-preview1-006723)

Product Information:
 Version:            2.1.0-preview1-006723
 Commit SHA-1 hash:  7e1fe7eba7

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.12
 OS Platform: Darwin
 RID:         osx.10.12-x64
 Base Path:   /usr/local/share/dotnet/sdk/2.1.0-preview1-006723/

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.0-preview3-25502-01
  Build    : bd3f818bad84f1296b4ee53f72ab8837b3caac98

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
wli3commented, Jul 12, 2017

Hi @julielerman this fix is in 6736, however, since you mentioned update, you need to remove the previous .templateengine folder that is having the wrong permission

cd ~
#carefull!!!
sudo rm -rf .templateengine/

or you can change the permission of the folder to user because the root cause of the problem is the folder is created by root incorrectly

1reaction
julielermancommented, Jul 12, 2017

I’m hitting this. I had the problem with 2.0.0-preview3-6694, then just updated to 6736 and still getting it. I was able to SUDO dotnet new but then I couldn’t save changes to any of the files so had to run sudo code from command. Also mac (I guess with “sudo” you could tell) So it DOES look like you have a fix merged in. What version should I be looking for? Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to resolve the "Permission Denied" error in Linux
While using Linux, you may encounter the error, “permission denied”. This error occurs when the user does not have the privileges to make...
Read more >
Fixing the 'Permission Denied' Error on Linux
As discussed, this error is the result of missing the necessary permissions in order to either read, write, or execute a file or...
Read more >
How to fix permission denied error in Linux? [Solutions]
This type of error will occur whenever you run a command for which you do not have the execute permission. Similarly, you cannot...
Read more >
How to Fix Shell Script Permission Denied Error in Linux
The shell script permission denied error occurs when the shell script you're trying to run doesn't have the permissions to execute. Linux tells ......
Read more >
"Access Denied" or other errors when you access or work ...
Issue 1: I receive an "Access Denied" error message when I try to access or work with files and folders · Press and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found