- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello everyone,
in SAS Viya 3.5 I am executing a SAS Code in SAS Studio to check a Linux directory for files.
"Pipe command="ls -1 /opt/sas/ftrans/*.csv"
NOTE: 17 records were read from the infile RDFILES."
That SAS Code returns no error. Also, the user being used has read and writing capabilities in the specified directory.
[user@server]$ pwd
/opt/sas/ftrans"
However, when i schedule the job in SAS Viya 3.5 I get permission denied.
"MPRINT(READFILES): filename rdfiles pipe "ls -1 /opt/sas/ftrans/*.csv";
ERROR: Insufficient authorization to access PIPE."
Any ideas?
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello everyone,
thank you for your inputs. However it seems the answer relies inside SAS Viya.
To allow SAS Studio to execute Linux commands, go to Environment Manager > Compute Contexts > SAS Studio Compute Context and add an attribute "allowXCMD" with the value "true".
To allow SAS Viya scheduled jobs to execute Linux commands, go to Environment Manager > Compute Contexts > SAS Job Execution Compute Context and add an attribute "allowXCMD" with the value "true".
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@fracou111 wrote:
Hello everyone,
in SAS Viya 3.5 I am executing a SAS Code in SAS Studio to check a Linux directory for files.
"Pipe command="ls -1 /opt/sas/ftrans/*.csv"
NOTE: 17 records were read from the infile RDFILES."
That SAS Code returns no error. Also, the user being used has read and writing capabilities in the specified directory.
"[user@server]$ touch a.txt
[user@server]$ pwd
/opt/sas/ftrans"
However, when i schedule the job in SAS Viya 3.5 I get permission denied.
"MPRINT(READFILES): filename rdfiles pipe "ls -1 /opt/sas/ftrans/*.csv";
ERROR: Insufficient authorization to access PIPE."
Any ideas?
Your scheduled job runs with
options noxcmd;
Check the configuration files that the scheduled jobs use, as the option is set at startup and cannot be changed later.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
<SASConfig>/Lev1/SASApp/BatchServer/sasbatch.sh executes sas with the noxcmd option, so you'd need to modify that file and change "noxcmd" to "xcmd":
[sas@host ~]$ egrep -n '^exec.*xcmd' /sas94/config/compute/Lev1/SASApp/BatchServer/sasbatch.sh 28:exec "$SAS_COMMAND" -noxcmd -lrecl 32767 "$@" "${USERMODS_OPTIONS[@]}"
Greg Wootton | Principal Systems Technical Support Engineer
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello everyone,
thank you for your inputs. However it seems the answer relies inside SAS Viya.
To allow SAS Studio to execute Linux commands, go to Environment Manager > Compute Contexts > SAS Studio Compute Context and add an attribute "allowXCMD" with the value "true".
To allow SAS Viya scheduled jobs to execute Linux commands, go to Environment Manager > Compute Contexts > SAS Job Execution Compute Context and add an attribute "allowXCMD" with the value "true".