$ ping google.com ping: icmp open socket: Operation not permitted
Is ping supposed to be an suid to root cmd?
On Sat, Mar 7, 2015 at 5:05 PM, jd1008 jd1008@gmail.com wrote:
$ ping google.com ping: icmp open socket: Operation not permitted
Is ping supposed to be an suid to root cmd?
No, it uses file capabilities to obtain only the specific permissions it needs.
You can set it straight by running as root: # setcap cap_net_admin,cap_net_raw+ep /usr/bin/ping
-T.C.
On 03/07/2015 07:05 PM, jd1008 wrote:
$ ping google.com ping: icmp open socket: Operation not permitted
Is ping supposed to be an suid to root cmd?
Here's my ping to Google and the replies. No root required.
[doug@linux64 ~]$ ping google.com PING google.com (167.206.10.221) 56(84) bytes of data. 64 bytes from 167.206.10.221: icmp_req=1 ttl=60 time=33.1 ms 64 bytes from 167.206.10.221: icmp_req=2 ttl=60 time=17.9 ms 64 bytes from 167.206.10.221: icmp_req=3 ttl=60 time=28.8 ms 64 bytes from 167.206.10.221: icmp_req=4 ttl=60 time=15.2 ms ^C --- google.com ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3005ms rtt min/avg/max/mdev = 15.248/23.781/33.152/7.426 ms