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
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.
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 ...
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.
You have to make the file executable:
chmod +x ArduinoWifiShield_upgrade.sh
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With