@bbr Did you verify if you were able to run the script before submitting your solution?
Ideally, you wouldn’t be able to unless it is some binary executable(which is not the case here I suppose).
You would need to add another permission to be able to execute your .sh
file.
A common cause for this error is that the shell (/bin/bash
in this case) needs to read the script’s contents to execute it. The permissions you showed (--x--x--x
) only allow execution, not reading.
To fix this, you must grant read permissions to the user (or all users) who need to execute the script. The simplest solution is to add read permissions for everyone.
sudo chmod a+r /tmp/xfusioncorp.sh
Then try to execute the script
/tmp/xfusioncorp.sh and it should work.
1 Like