Acorn22
Posts: 17
Joined: Wed Jun 17, 2015 11:47 pm

Jessie Lite ping command requires root permissions

Thu Dec 17, 2015 1:53 am

I have just installed the latest version of Jessie Lite. For some reason the ping command requires root. Is this intended behavior? How can I fix it?

Running ping without root:

Code: Select all

ping: icmp open socket: Operation not permitted

ripat
Posts: 191
Joined: Tue Jul 31, 2012 11:51 am
Location: Belgium

Re: Jessie Lite ping command requires root permissions

Thu Dec 17, 2015 7:09 am

Change ping's capabilities without using setuid:

Code: Select all

sudo setcap cap_net_raw=ep /usr/bin/ping
Or reinstall iputils-ping. Install script will reset ping's capabilities as it should.

Code: Select all

sudo apt-get install --reinstall iputils-ping
Problem is discussed here
Using Linux command line usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

Return to “Raspberry Pi OS”