Skip to main content

Pinging from a base user - ping: socket: Operation not permitted

The error message ping: socktype: SOCK_RAW followed by ping: socket: Operation not permitted indicates that the user does not have the necessary permissions to use the ping command.

The error message ping: => missing cap_net_raw+p capability or setuid? suggests that the user needs to have the cap_net_raw capability or setuid permission to use the ping command.

One solution to this issue is to run the ping command with superuser privileges using sudo. For example:

sudo ping 5.15.90.1

Alternatively, the user can add the cap_net_raw capability to their account using the following command:

sudo setcap cap_net_raw+ep /bin/ping

This will allow the user to use the ping command without needing superuser privileges.