RUN_DEMO.sh - Permission denied

Looking at the screenshot below it looks like I executed the command correctly, and as far as I know I’m logged in as admin.

I even went to the folder and assigned read/write permissions for all to the Demo folder.

Any thoughts on where I’m going wrong?

You almost certainly (though I am guessing a bit) need to give it execute permissions.

To check: cd to the directory and run an ls -l .

If it doesn’t have ‘x’ in the permissions string then:
chmod u+x RUN_DEMO.sh

then give it another go.

Hi Richard,

Looks like I need to assign permission to access the directory first.

What’s the command for that?

Thank you.

In your first screenshot you try to start RUN_DEMO.sh form root folder, but you are using ‘sudo -u tigergraph’ to switch to user tigergraph - this would not work.

You can copy TgDemo folder using root user to your tigergraph folder:
(as root!)

cp -Rv /root/Downloads/TgDemo /home/tigergraph/

Then change the right and ownership (still using root!):
chown -R tigergraph: /home/tigergraph/TgDemo

After this make all scripts executable:
chmod 755 /home/tigergraph/TgDemo/DemoExamples_2.0/Demo/*.sh

Now you log as tigergraph using sudo -u tigergraph

and start RUN_DEMO.sh
(-> change to /home/tigergraph/ first):
./TgDemo/DemoExamples_2.0/Demo/RUN_DEMO.sh

Or if you want to stay logged in as root and just run a script as user without switching to that user first:

su -u tigergraph /PATH/TO/SCRIPT.sh

Best,
Bruno