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.
Related
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.
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
Wrote path for flutter SDK with $HOME/.zshrc and with export PATH="$PATH:/Users/prettygirl/FlutterSDK/flutter/bin"
It went ok and even the flutter doctor worked.
Then when I close the terminal and reopen it, then it shows .zshrc permission denied, but I have given full disk access to the terminal.
/Users/prettygirl/.zprofile:export:1: not valid in this context: PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/prettygirl/FlutterSDK/flutter/bin /Users/prettygirl/.zshrc:1: permission denied: /Users/prettygirl/FlutterSDK/flutter/bin
now when I run flutter doctor it says zsh: command not found: flutter like I never updated the SDK path.
Opened .zshrc file with a text editorand it contains the path and opens fine.
Why is that?
you need to set the SDK path in the .zshrc file
open .zshrc file
vim .zshrc
add a line on this file
export PATH="$PATH:[PATH_OF_FLUTTER_GIT_DIRECTORY]/bin"
close terminal and reopen the terminal check
echo $path
if a path is showing then try other commands related to flutter.
flutter doctor
The terminal of my mac cant acces files in the documents folder. I get the following error:
zsh: permission denied
In system preferences I have given the terminal full disk acces. And when I go to the documents folder -> get info -> my username has read and write rights.
I have also ran chmod 777 on the folder but nothing seems to work. Does someone know what causes this problem?
Edit: it turns out that I cant acces a single file with te terminal. It looks like my terminal doesn't have the rights it should.
I fixed the issue! Nothing seemed to work so I wanted to reset the terminal. To do that I had te remove the following file:
~/Library/Preferences/com.apple.Terminal.plist
Then I restarted the terminal and now I can acces my files again!
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.