cancel
Showing results for 
Search instead for 
Did you mean: 

Run shell commands on Hana Server with XSJS

Former Member
0 Kudos

Hi everyone,

Since XSJS is server-side JavaScript such as Node.js, I wanted to know if there is some solutions to execute shell command (like "ls -al" or "pwd") as the example below (with node.js), or like 'exec' command in PHP:

Execute A Unix Command With Node.js | DZone

Or maybe if there is any xsjslib which does the same that ShellJS for Node.js (once again):

arturadib/shelljs · GitHub

I spent some time searching for examples with xsjs but I could not find any.

I know this has strong security issues so I understand we cannot do it but I prefer to be 100% sure with the answer of someone who has more experience than me with XS.

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

No, there is no API in XSJS that would allow access to the Shell or OS.

The only work around I could think of is to call back to the OS via outbound HTTP connectivity.  Of course this would require creating some executable or using some external Web Server on the OS level directly. In a HANA Appliance model that wouldn't be allowed.  Only certified applications are allowed installed on the same OS. 

Former Member
0 Kudos

That's all I need to know.
Thank you !

Answers (0)