Search code examples
macoslocalhostngrok

How to fix "error: cannot create ngrok Permission denied" in mac?


I am new to mac and bit confused about file structure .I am trying to download and access ngrok from my mac .I used below command to unzip the ngrok zip file

unzip /Users/apocha/Downloads/ngrok-v3-stable-darwin-amd64.zip

but getting below error:

Archive:  /Users/apocha/Downloads/ngrok-v3-stable-darwin-amd64.zip
error:  cannot create ngrok
        Permission denied

This is folder where I have ngrok zip file /Users/apocha/Downloads

Can someone help me fix this issue ?

I tried changing permissions of the file using below command ,

chmod -x ngrok

but got error

chmod: ngrok: No such file or directory

Solution

  • Hey @Apoorva you can also use the UI to unzip the file, should be possible to unzip by double click it when viewing the file with Finder app...

    Otherwise, just tested it on command line, cd ~/Downloads and then unzip ./ngrok-v3-stable-darwin-amd64.zip should also work.

    Seems odd there are no permissions in your own downloads folder, but the last command chmod -x ngrok should also reference the exact filename and not "ngrok" if you want to change permissions for that file.