Permission denied for executing batch file on linux compute node
19 Ansichten (letzte 30 Tage)
Tong Zhao am 11 Feb. 2022
On a local unbuntu 20.04 os, I have followed the MATLAB example of building code-generated model file (as rsim.tlc system target) on this link. Everything worked fine (using MATLAB R2020b update 6). But when I migrated the files onto a compute node in a university cluster (with MATLAB R2020b initial version), and repeating the same steps for calling the batch script, now matlab is giving me error saying permission denied. The permission denied error came when the code was executed to the following step in the example:
batFileName = 'rtwdemo_rsim_vdp_run_scr';
[stat, res] = system(['.' filesep batFileName]);
if stat ~= 0
error(['Error running batch file ''', batFileName, ''' :', res]);
I packaged the above script into a file named run_batch.m and the error was:
Error using run_batch (line 4)
Error running batch file 'rtwdemo_rsim_vdp_run_scr' :/bin/bash: ./rtwdemo_rsim_vdp_run_scr: Permission denied
I am not sure what `Permission denied` indicates out of the system() function. Sure, I don't have sudo (super-user) status on the cluster node. But I didn't need the sudo status to run this example perfectly in my local Ubuntu 20.04 laptop. So I'm stuck here. Eventuall I'd like to be able to run this exmaple on the cluster node.
Any tip is appreciated!