can ping only with sudo

2007-10-06 Thread tom arnall
lately i inadvertently did 'chmod 777 -R /dev' on my system (as root, of 
course!). now i find that to ping anyone i have to do it as sudo, else i get:

ping: icmp open socket: Operation not permitted

could the two things be connected?

thanks,

tom arnall





-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: can ping only with sudo

2007-10-06 Thread Jeff D

On Sat, 6 Oct 2007, tom arnall wrote:


lately i inadvertently did 'chmod 777 -R /dev' on my system (as root, of
course!). now i find that to ping anyone i have to do it as sudo, else i get:

ping: icmp open socket: Operation not permitted

could the two things be connected?

thanks,

tom arnall



ping usually needs root permissions to run as a normal user, chmod 4755 
/bin/ping  should fix it


-+-
8 out of 10 Owners who Expressed a Preference said Their Cats Preferred Techno.


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: can ping only with sudo

2007-10-06 Thread David Fox
On 10/6/07, tom arnall [EMAIL PROTECTED] wrote:
 lately i inadvertently did 'chmod 777 -R /dev' on my system (as root, of
 course!). now i find that to ping anyone i have to do it as sudo, else i get:

 ping: icmp open socket: Operation not permitted

Something is odd indeed.

I attempted to run an strace (sometimes those can be useful to see
what devices and files it is trying to read - look at access() and
open() functions in particular) but I get the same error as you if I
try to do an strace on ping. Otherwise, ping runs normally.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: can ping only with sudo

2007-10-06 Thread Andy Smith
Hi David,

On Sat, Oct 06, 2007 at 05:46:58PM -0700, David Fox wrote:
 On 10/6/07, tom arnall [EMAIL PROTECTED] wrote:
  lately i inadvertently did 'chmod 777 -R /dev' on my system (as root, of
  course!). now i find that to ping anyone i have to do it as sudo, else i 
  get:
 
  ping: icmp open socket: Operation not permitted
 
 Something is odd indeed.
 
 I attempted to run an strace (sometimes those can be useful to see
 what devices and files it is trying to read - look at access() and
 open() functions in particular) but I get the same error as you if I
 try to do an strace on ping. Otherwise, ping runs normally.

I believe this is because it won't run setuid under strace.  As Tom
says in the other reply, the OP's problem is most likely that
/bin/ping has lost its setuid bit.

Cheers,
Andy

-- 
http://bitfolk.com/ -- No-nonsense VPS hosting
Encrypted mail welcome - keyid 0x604DE5DB


signature.asc
Description: Digital signature