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

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

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.

Related

zsh: permission denied: webstorm - On Attempting to Create Shell Script That Launches WebStorm

I am following the documentation on creating a Shell script that launches the WebStorm application for a given file folder as described on WebStorm Help page. I am currently using an M1 Pro Macbook (2022) that I just got today and has little else installed beyond Homebrew, VSCode, WebStorm, and PyCharm.
Following the example in the docs, I created a file called webstorm (without any extension) in usr/local/bin and added the following code to it:
#!/bin/sh
open -na "WebStorm.app" --args "$#"
After starting up a new terminal, and running webstorm ., I get the following error in my terminal:
zsh: permission denied: webstorm
I have:
Changed sh to zsh as my default shell is zsh, and that made no difference.
Checked my permissions for both usr/local/bin and usr/local/bin/webstorm to ensure that I have the correct permissions to execute files from here. When right clicking on the webstorm file and clicking "Get Info", I can see that I currently have read and write permissions.
Restarted my computer
To add to my confusion, I have used the same script in the same location on my work Macbook, and it has worked without issues.
Any help on this would be hugely appreciated.
Checked my permissions for both usr/local/bin and usr/local/bin/webstorm to ensure that I have the correct permissions to execute files from here. When right clicking on the webstorm file and clicking "Get Info", I can see that I currently have read and write permissions.
Do you have the "execute" permission?
Try:
$ chmod +x /usr/local/bin/webstorm

Cant run python files on terminal in Mac

Whenever I try python "x".py it says file can't be found
and when I try drag the file into terminal it says permission denied.

Permission denied when trying to run karaf 0.8.1

I downloaded the OpenDaylight Oxygen SR1 Zip file, unzipped the karaf-0.8.1 file, changed my directory to it but when I try to run ./bin/karaf I get:
./bin/karaf: Permission denied
When I try sudo ./bin/karaf I get
sudo: ./bin/karaf: command not found
The weirdest part is that I also have the folder of the previous version, i.e. karaf-0.7.1, in the same Downloads folder and these commands work perfectly fine in there. I would like to use the latest version however. Could anyone help me please?
Edit: Sorry, forgot to mention I'm running it on Mac OS X
On a Unix-like system, you’re better off downloading the tarball: extracting that will give you files with the correct permissions.
In your case, to fix your setup, you need to run
chmod 755 bin/{client,inc,instance,karaf,setenv,set_persistence.sh,shell,start,status,stop}
to restore the permissions as they ship in the tarball.

Flume configuration

I am trying to configure Flume. When I run the following command:
sudo mv Downloads/flume-sources-1.0-SNAPSHOT.jar /usr/lib/apache-1.7.0-bin/lib/
I get the following error:
mv: cannot move Downloads/flume-sources-1.0-SNAPSHOT.jar' to/usr/lib/apache-1.7.0-bin/lib/': No such file or directory.
Any one can help me please?
Thanks.
In step 5 you are asked to download the file:
Use below link and download flume-sources-1.0-SNAPSHOTS.jar
https://drive.google.com/file/d/0B-Cl0IfLnRozUHcyNDBJWnNxdHc/view?usp=sharing
Then at the start of step 6 it says:
Move the flume-sources-1.0-SNAPSHOT.jar file from Downloads directory
to lib directory of apache flume:
Command: sudo mv Downloads/flume-sources-1.0-SNAPSHOT.jar /usr/lib/apache-flume-1.4.0-bin/lib/
This step has assumed that your downloads folder is called Downloads and is a subfolder of the one that your console is open at the time. If this is not the case, use the cd command to move to the folder where the newly downloaded file exists, and run sudo mv flume-sources-1.0-SNAPSHOT.jar /usr/lib/apache-flume-1.4.0-bin/lib/
Alternatively if you have access to a desktop on the machine, just cut and paste the downloaded file from where it went when you downloaded it from the internet into the folder /usr/lib/apache-flume-1.4.0-bin/lib/

Unable to understand a permission warning in Mac

I have 777 permissions for the app AquaLess installed by MacPorts.
I run
./AquaLess.app
I get
zsh: permission denied: ./AquaLess.app
This is a strange warning, since I have 777 permissions.
How can you use the program installed by MacPorts?
Type open AquaLess.app
A file with .app extension isn't an executable file. It's a directory that contains various resources in ways that Mac OS knows how to open.
You would get the same warning if you tried to execute $HOME.
Or you could run:
$ ./AquaLess.app/Contents/MacOS/AquaLess
Which runs the actual executable within the .app bundle.

Resources