Permission denied in mac terminal
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
You have to make the file executable:
chmod +x ArduinoWifiShield_upgrade.sh