Oozie和Hue:运行shell脚本时权限被拒绝
我在HDFS/user/users中有一个shell脚本示例_shell.sh,如下所示:Oozie和Hue:运行shell脚本时权限被拒绝,shell,hadoop,oozie,hue,Shell,Hadoop,Oozie,Hue,我在HDFS/user/users中有一个shell脚本示例_shell.sh,如下所示: source /user/user/params_new.cfg echo "HELLO WORLD" echo $layer params_new.cfg也位于HDFS/user/user目录中,其内容为: layer="S" 我是Oozie的新手,尝试在Hue中设置一个Oozie工作流,该工作流将执行示例_shell.sh脚本。其性质如下: <workflow-app name="sh
source /user/user/params_new.cfg
echo "HELLO WORLD"
echo $layer
params_new.cfg也位于HDFS/user/user目录中,其内容为:
layer="S"
我是Oozie的新手,尝试在Hue中设置一个Oozie工作流,该工作流将执行示例_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"/>
我不明白出了什么问题!如果我从sample_shell.sh代码中删除source/user/user/params_new.cfg和echo$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
检查/user和/user/user目录的权限我想你应该给OP一个提示怎么做,因为他不明白这个明显的信息。@但/user目录的权限如下:drwxrwt-user_name supergroup 0 2015-03-10 04:37/user那么问题出在哪里?@user1452759有四个需要许可的事情。你的文件,保存你的文件的目录,保存那个目录的目录。因为我看到你的文件有777个权限,我想让你同时检查目录/user和目录/user/user,看起来你只检查了/user。@但目录/user和/user/user目录都有相应的权限。问题在于我在代码中调用params_new.cfg文件并访问其中的变量的方式。我只需要给出源params_new.cfg,而不是params_new.cfg的整个路径。您使用的是哪个版本的色调?您解决过这个问题吗?
-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