You are not logged in.
Pages: 1
Topic closed
I have an odd situation where I can use ping as a regular user from openbox's autostart if I run the OS from storage disks but not if I load the OS into RAM. It only works for a regular user with the OS loaded to RAM when I set the sticky bit.
Can this be a timing problem with systemd not activating a required service in time?
Last edited by KairiTech (2014-08-26 21:16:45)
Offline
Whatever you're using to copy to RAM must not preserve capabilities. ping relies on having cap_net_admin (for SOCK_RAW) in order for non-root users to make use of it.
Last edited by falconindy (2014-08-26 13:54:33)
Offline
Yep! That's it exactly. I create a root file system archive to speed the loading into RAM. See the exact code below:
sudo tar -vzcf /rootfs.tar.gz / --exclude={/rootfs.tar.gz,/boot/*,/var/cache/pacman/pkg/*,/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found}
Adding the --xattrs option to tar solved it.
Last edited by KairiTech (2014-08-26 21:17:46)
Offline
I was having this issue in an archlinux incus container image.
This solved the issue:
setcap 'cap_net_raw+p' /usr/bin/ping
Offline
Closing this 10 year old thread
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Pages: 1
Topic closed