2015-03-19 67 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