Linux File Permissions Task

I believe that ChatGPT sometimes provides incorrect answers. I tested running a script on my local machine with only execute permissions, without read permission,
---x--x--x 1 mohamed mohamed 19 Oct 23 00:45 t.sh*

It has failed with this error:
/bin/bash: ./t.sh: Permission denied.

So, I think you need both read and execute permissions in order to run the script. :wink:

You better believe it!

read and execute are required to run a script, because the script file must be read into memory before it can be executed.