Oozie:Hue:运行shell脚本时拒绝权限

我在HDFS /user/user 中有一个shell脚本 sample_shell.sh ,如下所示:

source /user/user/params_new.cfg
 echo "HELLO WORLD"
 echo $layer

params_new.cfg也在HDFS /user/user 目录中,其内容为:

layer="S"

我是oozie的新手,并试图在Hue中设置一个oozie工作流程,它将执行sample_shell.sh脚本 . 属性如下:

<workflow-app name="shell_sample" xmlns="uri:oozie:workflow:0.4">
<start to="shell_sample"/>
<action name="shell_sample">
    <shell xmlns="uri:oozie:shell-action:0.1">
        <job-tracker>${jobTracker}</job-tracker>
        <name-node>${nameNode}</name-node>
        <exec>/user/user/sample_shell.sh</exec>
        <file>/user/user/sample_shell.sh#sample_shell.sh</file>
        <file>/user/user/params_new.cfg#params_new.cfg</file>
          <capture-output/>
    </shell>
    <ok to="end"/>
    <error to="kill"/>
</action>
<kill name="kill">
    <message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<end name="end"/>

但是我收到以下错误:

Log Length: 165
./sample_shell.sh: line 2: /user/user/params_new.cfg: Permission denied
 Failing Oozie Launcher, Main class     [org.apache.oozie.action.hadoop.ShellMain], exit code [1]

我不会_1304341错了!如果我从sample_shell.sh代码中删除 source /user/user/params_new.cfgecho $layer 行..它工作正常!

权限如下 .

-rwxrwxrwx   3 user_name supergroup       1590 2015-03-19 04:01 /user/user/params_new.cfg
 -rwxrwxrwx   3 user_name supergroup        139 2015-03-19 04:18 /user/user/sample_shell.sh

任何帮助都感激不尽!!!

回答(1)

2 years ago

检查/ user和/ user / user目录的权限