Ask / Submit

Ping: Permission denied

asked 2018-06-10 12:33:28 +0300

wickedsp1d3r gravatar image

After upgrading to the latest SailfishOS Mouhijoki, ping started to fail.

For example:

$ ping
PING ( 56 data bytes
ping: permission denied (are you root?)

What is causing this? And how to fix it? Thanks.

edit retag flag offensive close delete



Now that you mentioned that, it's quite annoying.

Direc ( 2018-06-11 18:24:50 +0300 )edit

4 Answers

Sort by » oldest newest most voted

answered 2018-06-11 23:52:10 +0300

juiceme gravatar image

updated 2018-09-06 13:24:07 +0300

Indeed the busybox ping is used now. Busybox uses stricter permission set for ping than the iputols ping that was usedin previous release.

The correct way to fix this is to add the nemo user to the "net_raw" group;

devel-su usermod -a nemo -G net_raw

Note that even though this sets the group immediately, it does not take effect until you log out of your window manager session and log back in. (this means either device reboot or killing lipstick)

You can however test that it works before booting by ssh'ing to your localhost from console and then trying to ping as nemo; now it will work because sshd forks a new user session for you and the new permissions are in force.

( And by the way as usual this was already noted, discussed and fixed in TMO exactly 9 days ago; )

--- edit ---

Update to Nurmonjoki reset the groups, so ping stopped working again... Solution, same as above.

edit remove flag flag offensive (1) delete publish link more


All of my friends use this website and it's a great resource for questions and answers and this post is also very useful. There are few awesome tricks that help in English writing and is one of the best English essays repository. I was confused in this question and i am glad to read this now and it anwsered my questions.

BraydenHoutman ( 2018-11-09 15:58:30 +0300 )edit

answered 2018-06-10 13:27:22 +0300

updated 2018-06-10 13:28:06 +0300


devel-su ping (enter) (password) (enter)

edit flag offensive delete publish link more

answered 2018-06-10 14:16:20 +0300

wickedsp1d3r gravatar image

I know that I can issue it as root, but why I need to? What's changed?

edit flag offensive delete publish link more



My guess is that they removed the ping binary/iputils package and replaced ping with a symlink to busybox, probably to save space. I tried to install iputils, but got a message "this request will break your system".

Mohjive ( 2018-06-10 14:23:24 +0300 )edit

I succeed to build iputils from here. Did busybox come with the latest update?

wickedsp1d3r ( 2018-06-10 16:27:16 +0300 )edit

I have noticed that pkcon install/remove something-something also now requires devel-su

Edz ( 2018-06-10 18:04:22 +0300 )edit

answered 2018-06-10 13:54:08 +0300

nephros gravatar image

updated 2019-07-30 17:45:02 +0300

DISCLAIMER: Don't do this. See discussion/better version in comments.

(Original comment removed, which recommended setting the (presumed) ping binary setuid root)

edit flag offensive delete publish link more



This is a convenient way to be able to run 'ping' as root user, but I strongly recommend against it. /bin/ping is a symlink to busybox and the command above will set the setuid bit for the busybox executable, which will affect all commands delegated to busybox.

Mohjive ( 2018-06-10 14:14:31 +0300 )edit

@Mohjive darn, yea that's a very good point.

How about this then:

$ devel-su
# rm /bin/ping
# cp /bin/busybox /bin/ping
# chmod +s /bin/ping

or even better:

$ devel-su
# rm /bin/ping
# cp /bin/busybox /bin/ping
# setcap cap_net_raw+p /bin/ping
nephros ( 2018-06-11 15:37:00 +0300 )edit

I checked net.ipv4.ping_group_range but it is already allowing ping for all users.

Direc ( 2018-06-11 18:41:21 +0300 )edit
Login/Signup to Answer

Question tools



Asked: 2018-06-10 12:33:28 +0300

Seen: 1,409 times

Last updated: Jul 30