0

I'm starting a java program as a non-privileged user that I sudo'd into, then exit the shell. Being root again I try to kill -9 the java process. This causes a "permission denied" error. Then I sudo again to the owning user. Kill works as expected. This behavior is reproducible The environment is a virtual machine on VMWare, SLES 15.2, adopt JDK 17(though that shouldn't matter or that it is java at all).

How does that work ? As root I should be able to kill anything that isn't stuck in kernel mode. Who is to blame for this unexpected behavior ? (What did Poettering use as en excuse to introduce this change - just kidding ;)

Dino
  • 3
  • 1
  • as root about to use the kill command, what's the output of this command? `grep ^CapEff /proc/$$/status` . If it's not `CapEff: 000001ffffffffff` (or a near value with a lot of `f`) then something's wrong. – A.B Aug 03 '22 at 15:10
  • Hello, the output is "CapEff: 0000003fffffffff" – Dino Aug 04 '22 at 10:01
  • The value looks usual (and it does include cap_kill with `capsh --decode=0000003fffffffff`), you can ignore my comment (and look at other comments/answers for other reasons than just capabilities). – A.B Aug 04 '22 at 18:03

1 Answers1

1

Check if you have Apparmor enabled, it can block your attempts to kill that process as non-owner.