Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Permission denied in mac terminal

I'm trying to write a command on mac terminal using the root, but it shows me that the permission denied, when I use the sudo it shows that the command not found

can any one please help me

aftheers-MacBook-Air:scripts root# ./ArduinoWifiShield_upgrade.sh
-sh: ./ArduinoWifiShield_upgrade.sh: Permission denied
like image 318
sara Avatar asked Jan 19 '16 13:01

sara


People also ask

How do I grant permission in Mac Terminal?

Open the Terminal application. Type ls –l , and then press Return. The symbolic permissions of the files and folders in your home directory are displayed, as shown below. Type chmod 755 foldername , and then press Return.

Why is it showing Permission denied in Terminal?

Usually, you get the error bash permission denied when running some script/file that does not have execute permissions. All you need to do is to change file permissions and add executive one. For example, if you run a Magento 2 CLI command: bin/magento ...

How do I give permission in Terminal?

Use the following procedure to change permissions in symbolic mode. If you are not the owner of the file or directory, become superuser. Only the current owner or superuser can use the chmod command to change file permissions on a file or directory. Change permissions in symbolic mode by using the chmod command.


2 Answers

You have to make the file executable:

chmod +x ArduinoWifiShield_upgrade.sh
like image 51
Arc676 Avatar answered Oct 13 '22 05:10

Arc676


To avoid permission denied prompt, type this command and continue

sudo su

Install the packages in this admin mode,

then go back to normal mode

exit
like image 36
Vaishnavi Bala Avatar answered Oct 13 '22 03:10

Vaishnavi Bala