After running,

$ ls -l /bin/ping
-rwsr-xr-x 1 root root 34740 Nov  5  2012 /bin/ping

I wonder, why doesn't Ubuntu use capabilities (i.e. raw sockets) rather than setuid?

  • ¡Attention! In Ubuntu 20.04 there's no cap_net_raw capability yet but bit suid neither!!?? I don't know how ping can be run flawessly if it has rwxr-xr-x permissions and no capabiliy (getcap shows nothing). I can't understand!!
    – Osqui
    Oct 23, 2020 at 20:14
  • Well, I've found the answer myself. It's here: unix.stackexchange.com/questions/592911/…
    – Osqui
    Oct 23, 2020 at 20:22

1 Answer 1


It is considered a bug if a package has overly permissive capabilities, so these cases should be reported. However, they might have already fixed it according to https://bugs.launchpad.net/ubuntu/+source/iputils/+bug/534341

  • Since Ubuntu 16.04 uses setuid, how could I use the C# Ping class constructor to avoid the TypeInitializer for 'System.Net.NetworkInformaton.Ping threw an exception error? Thank you.
    – Frank
    Jul 24, 2016 at 6:28
  • @Frank, that is best asked as another question, as it is not a clarification or comment on this answer.
    – vonbrand
    Sep 22, 2021 at 22:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .