N
N
nuclear_kote2020-07-05 22:30:44
Java
nuclear_kote, 2020-07-05 22:30:44

Why does Runtime.getRuntime.exec throw error=13, Permission denied?

I'm running under debian 10.
5f0229421fd37629082731.png

java.io.IOException: Cannot run program "/usr/bin/cat": error=13, Permission denied
  at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128) ~[na:na]
  at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071) ~[na:na]
  at java.base/java.lang.Runtime.exec(Runtime.java:590) ~[na:na]
  at java.base/java.lang.Runtime.exec(Runtime.java:414) ~[na:na]
  at java.base/java.lang.Runtime.exec(Runtime.java:311) ~[na:na]


java is launched under root, /usr/bin/cat is launched under the same user, /usr/bin/ping and others are also not launched from under java, but are launched from the console,

setenforce 0

did not give anything

python -c "import os; os.system('/usr/bin/ping 8.8.8.8')" - works, not from java

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nuclear_kote, 2020-07-06
@nuclear_kote

in general, I rearranged the toad, it worked

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question