How can I use the ping command in a chroot environment?
$ ping 8.8.8.8
ping: icmp open socket: Operation not permitted
Currently I am using CentOs, but ideally there must be a solution that works in all chrooted environments.
feedback
|
This question came from our site for professional and enthusiast programmers.
|
Under Linux,
Note that there may be other commands in the chroot that need to be setuid (or setgid), in particular Note that this answers assumes a chroot, not something with more restrictions like a jail. | |||
|
feedback
|
|
There shouldn't be a problem using ping or any other part of the gnu tool chain within a chroot, so long as these binaries are present in your path. If these commands cannot be accessed, perhaps you should check your environment variables. | |||
|
feedback
|