11
/Users/myname
zsh: permission denied: /Users/myname

I already gave the terminal full disc access and restarted my mac but it won't let me access this directory.

cdott
  • 115
  • 1
  • 2
  • 6

3 Answers3

28

You need to enable auto_cd. Add this to your ~/.zshrc:

setopt auto_cd

UnknownUnknowns
  • 838
  • 8
  • 17
0

If you execute the command /Users/myname, it doesn't make sense, it's like asking a folder to execute.

You probably want to change directory, so cd /Users/myname

lolesque
  • 10,693
  • 5
  • 42
  • 42
0

Use following command and enter password when promoted (Administrator mode)

sudo su

After this you can run script which is showing permission denied messages while accessing any directory or file

Prakash
  • 605
  • 6
  • 16