What permission does a Presto CLI command inside a shell script require in order to be able to execute

I have a oozie workflow which calls a shell script. The shell script calls a presto cli query. If I execute the shell script from the putty terminal then everything works as expected

But when I run the Workflow an error is raised. I know the shell script itself is being called successfully as I can see my ECHO statement in the log fileas below

This script is stored inside the Hadoop File system

shell script :


echo Execute Presto Command /home/hdfs/presto-cli --server --catalog hive --schema test --execute 'SELECT * from test limit 10'

However when the presto-cli command is called a "Permission Denied" error is raised

I can see in the Oozie GUI for the action that is running as my HDFS user so I am not sure what permission it refers to?

I read somewhere that you need to tell the workflow to run as the user who launched the workflow and not the YARN user. I added the env-var tag to my workflow action (see below) but this didnt help either

My Workflow's action is below :

      <action name="Shell-Action">
    <shell xmlns="uri:oozie:shell-action:0.1">
          <ok to="end"/>
          <error to="fail"/>

What am I doing wrong?