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: