draschke/vsc-sap-hana-mta-dev-env-node14x

Running xs in a Dev Container doesn't work

Closed this issue · 2 comments

Running xs in Dev Container caused a Permission denied
node ➜ /workspaces/vscode-sap-hana-dev-env-for-running-hana-cli-2 (main ✗) $ xs
bash: /workspaces/vscode-sap-hana-dev-env-for-running-hana-cli-2/XS_CLIENT00P_134-70001320/bin/xs: Permission denied

Dev Container: - running xs doesn't works!*

node ➜ /workspaces/vscode-sap-hana-dev-env-for-running-hana-cli-2/XS_CLIENT00P_134-70001320/bin (main ✗) $ ls -lt
total 4
-rw-r--r-- 1 node node 1696 Jun  7 13:49 xs

node ➜ /workspaces/vscode-sap-hana-dev-env-for-running-hana-cli-2/XS_CLIENT00P_134-70001320 (main ✗) $ ls -lt
total 52
drwxr-xr-x 5 node node  4096 Aug  2 13:01 sapjvm_8_jre
drwxr-xr-x 3 node node  4096 Aug  2 13:01 jars
drwxr-xr-x 2 node node  4096 Aug  2 13:01 bin
-rw-r--r-- 1 node node 37245 Jun 17 11:08 SIGNATURE.SMF

WSL locally: - running xs works!

➜  bin git:(main) ✗ ls -lt
total 4
-rw-r--r-- 1 diraschk diraschk 1696 Jun  7 15:49 xs

➜  XS_CLIENT00P_134-70001320 git:(main) ✗ ls -lt
total 52
drwxr-xr-x 5 diraschk diraschk  4096 Aug  2 15:01 sapjvm_8_jre
drwxr-xr-x 3 diraschk diraschk  4096 Aug  2 15:01 jars
drwxr-xr-x 2 diraschk diraschk  4096 Aug  2 15:01 bin

Before you start your Dev Container, you need to set the -x permission to the XS_CLIENT00P_134-70001320/bin/xs file with root
chmod -R +x xs

before setting permission
-rw-r--r-- 1 diraschk diraschk 1696 Aug  3 09:12 xs
after setting permission
-rwxr-xr-x 1 diraschk diraschk 1696 Aug  3 09:12 xs

image

And before you start your Dev Container, you need to set the -x permission within the XS_CLIENT00P_134-70001320/sapjvm_8_jre/bin folder with root
chmod -R +x bin
image

I did it again with chmod -R +x xs and changed at first the permission in WSL Ubuntu.
(You can see the result for before and after changing the permission within the two /bin folders.)

image

image

Afterthat I run the container "Reopen in container" and I was able to use the XS-Client for XSA connection.
image

If someone has a solution for doing this inside of the dockerfile, I really would appreciate it, to let me know how this works!