If I have turned off execute permissions on
hello.sh and try to execute it
~$ sudo chmod 0666 hello.sh ~$ ./hello.sh -bash: ./hello.sh: Permission denied
I get the permission error. But I can easily override that by using the
$ . hello.sh hello everyone
What's the purpose of setting the execute permission on a file if someone can override it using the
#!/bin/bash echo 'hello everyone'