I have a script called foo.sh
in my home folder.
When I navigate to this folder, and enter ./foo.sh
, I get
-bash: ./foo.sh: Permission denied
.
When I use sudo ./foo.sh
, I get
sudo: foo.sh: command not found
.
Why does this happen and how I can fix it?