在我DIY的Java我有這個在我的action_hooks啓動外殼Openshift DIY的Java
cd $OPENSHIFT_DATA_DIR
export JAVA_HOME=/etc/alternatives/java_sdk_1.8.0
export PATH=$JAVA_HOME/bin:$PATH
libs="libs"
export LIB=$OPENSHIFT_REPO_DIR$libs
src="src"
export JAVA_FILES=$OPENSHIFT_REPO_DIR$src
export MATCHFACES=$OPENSHIFT_REPO_DIR$src/matchfaces
cd $OPENSHIFT_REPO_DIR
if [[ -z "$OPENSHIFT_INTERNAL_IP" ]]; then export OPENSHIFT_INTERNAL_IP="$OPENSHIFT_DIY_IP"; fi
if [[ -z "$OPENSHIFT_INTERNAL_PORT" ]]; then export OPENSHIFT_INTERNAL_PORT="$OPENSHIFT_DIY_PORT"; fi
nohup dir $LIB > ${OPENSHIFT_DIY_LOG_DIR}/output1.log 2>&1 &
nohup javac -classpath .;$LIB/JavaBridge.jar;$LIB/FaceSDK.jar;$LIB/jna.jar $MATCHFACES/*.java > ${OPENSHIFT_DIY_LOG_DIR}/compile.log 2>&1 &
nohup java -classpath .;$LIB/JavaBridge.jar;$LIB/FaceSDK.jar;$LIB/jna.jar $MATCHFACES/Listener > ${OPENSHIFT_DIY_LOG_DIR}/Listener.log 2>&1 &
,但上面的代碼給我pemission被拒絕的錯誤。從上面的shell中,我試圖訪問我上傳到我的存儲庫的libs文件夾,該文件夾包含我的Java應用程序需要的外部依賴關係。任何人都可以解釋爲什麼以及如何擺脫這個錯誤。
誤差S下方
遠程:/var/lib/openshift/586b985a89f5cfe9fa0000bc/app-root/runtime/repo//.openshift/action_hooks/start:線32:的/ var/lib中/ openshift /586b985a89f5cfe9fa0000bc/app-root/runtime/repo/libs/JavaBridge.jar:權限被拒絕 remote:/var/lib/openshift/586b985a89f5cfe9fa0000bc/app-root/runtime/repo//.openshift/action_hooks/start:line 32: /var/lib/openshift/586b985a89f5cfe9fa0000bc/app-root/runtime/repo/libs/FaceSDK.jar:權限被拒絕