Score:0

Cannot execute .sh file

tl flag

I am having an issue making a file executable. The file is gatewaystart.sh. I have unzipped a downloaded folder containing the specified file, into /opt/ibc using the command

sudo unzip ~/Downloads/IBCLinux-3.18.0.zip -d \
/opt/ibc

Next, I make the file executable by running

cd /opt/ibc
sudo chmod o+x *.sh */*.sh

The issue that I am facing is that when I run gatewaystart.sh after executing those commands in the terminal, the file does not execute. I have tried executing bash gatewaystart.sh and sh gatewaystart.sh however I get the error:

gatewaystart.sh: 193: [[: not found
gatewaystart.sh: 195: [[: not found
-e Error: no execute permission for scripts in /opt/ibc/scripts

Help on this matter would be appreciated.

Thank you.

cn flag
take this literally `no execute permission for scripts in /opt/ibc/scripts` .... check permissions of directory "scripts".
hr flag
You only set `+x` for **o**thers - what is the ownership (user and group) of the script(s), and what user is executing `gatewaystart.sh`?
dinosaurslayer avatar
tl flag
I have managed to set the permission of /opt/ibc/scripts and successfully ran gatewaystart.sh, however upon restarting my machine the permissions go away. Can anyone help resolve this issue?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.