Permission denied when trying to start custom app

I’m running RHEL8 with OOD 2.0.1 using OHPC 2.1.

I’ve got the xfce desktop up and running with OOD so that’s good.

I’m trying to get RStudio running. I’ve got another cluster with CentOS 7 and OOD 1.6 with RStudio working. I’ve copied the app files from there and made the modifications for the match up to this new cluster.

I’m getting this in the output file:

Setting VNC password...
Starting VNC server...

Warning: compute-0.internal:1 is taken because of /tmp/.X1-lock
Remove this file if there is no X server compute-0.internal:1
Killing Xvnc process ID 421234
Xvnc process ID 421234 already killed
Xvnc did not appear to shut down cleanly. Removing /tmp/.X11-unix/X1
Xvnc did not appear to shut down cleanly. Removing /tmp/.X1-lock

Desktop 'TurboVNC: compute-0.internal:1 (foo)' started on display compute-0.internal:1

Log file is vnc.log
Successfully started VNC server on compute-0:5901...
Script starting...
Starting websocket server...
/var/spool/slurm/d/job00009/slurm_script: line 185: /users/foo/ondemand/data/sys/dashboard/batch_connect/sys/RStudio/output/35fa7141-de7f-44dd-a6f4-340d33e6d762/script.sh: Permission denied
WebSocket server settings:
  - Listen on :6015
  - No SSL/TLS support (no cert file)
  - Backgrounding (daemon)
Scanning VNC log file for user authentications...
Generating connection YAML file...
Cleaning up...
Killing Xvnc process ID 421691

I’ve checked the permissions on that script.sh file and the foo user owns it. Can anyone help guide me through troubleshooting this?

script.sh is the script you’ve provided in your application. (template/script.sh.erb).

I’d check line 185 of that resulting script as that line seems to be the issue.

So script.sh is actually only 34 lines.

#!/usr/bin/env bash


i#Clean the environment
module purge

# Set working directory to home directory
#cd "${HOME}"

cd /users/$(whoami)
#
# Launch Xfce Window Manager and Panel
#
(
  export SEND_256_COLORS_TO_REMOTE=1
  export XDG_CONFIG_HOME="/users/foo/ondemand/data/sys/dashboard/batch_connect/sys/RStudio/output/1179d179-1414-4c50-bebb-4ed18c597dd5/config"
  export XDG_DATA_HOME="/users/foo/ondemand/data/sys/dashboard/batch_connect/sys/RStudio/output/1179d179-1414-4c50-bebb-4ed18c597dd5/share"
  export XDG_CACHE_HOME="$(mktemp -d)"
  module restore
  set -x
  xfwm4 --compositor=off --daemon --sm-client-disable
  xsetroot -solid "#D3D3D3"
  xfsettingsd --sm-client-disable
  xfce4-panel --sm-client-disable
) &

# Start BioGrids app
source /programs/biogrids.shrc >> $HOME/ondemand.out  2>&1
export SB_SITENAME=${SB_SITENAME}-OOD
echo "Starting ondemand export RSTUDIO_X=2022.02.3;  export R_X=4.1; rstudio "  >> $HOME/ondemand.out  2>&1
# launch the app selected in widget
# jupyter needs runtime dir unset because user ID gets mixed up sometimes
unset XDG_RUNTIME_DIR
export RSTUDIO_X=2022.02.3;  export R_X=4.1; rstudio

LOL - sorry, this is much easier than I’m making it.

Set the original file template/script.sh.erb to executable. The file is being copied as is, so if it starts as 644 it’ll be copied as 644. It needs to be 755 (or 750 if you prefer).

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.