2015-03-19 66 views
1

我在HDFS /user/user一个shell脚本sample_shell.sh它看起来像下面:Oozie的色相:被拒绝的权限,同时运行shell脚本

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] 

我不明白发生了什么事情错了!如果我从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 

任何帮助将非常感谢!

+0

您正在使用哪个版本的Hue? – Romain 2015-03-20 03:26:25

+0

你有没有解决这个问题? – Petro 2017-01-23 21:49:32

回答

-1

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

+0

我想你应该给OP一个提示如何做,因为他明白没有得到这个明显的信息。 – 2015-03-19 21:47:36

+0

@dan/user目录的权限如下: drwxrwxrwt - user_name supergroup 0 2015-03-10 04:37 /用户 那么问题是什么? – user1452759 2015-03-20 05:51:44

+0

@ user1452759有四件事情需要权限。您的文件,保存您的文件的目录,保存该目录的目录。由于我看到您的文件拥有777个权限,因此我希望您检查目录/用户和目录/用户/用户,它看起来像只有checked/user。 – dan 2015-03-31 15:25:34