in reply to Socket problem - when running Win32 app as someone different than Admin

In *Nix-land, you have to be a super-user to bind to a socket (I'm just guessing the same is true in Win32 land). If you look at the *Nix command ping, it is suid root and that's why Joe User can use it. I'm guessing but if you look at the perms for your NT version of ping and give your perl script the same perms, it should work.

-derby

update: that should be you may have to be super-user to bind to a socket (depends on the port number). If you do not have access, bind should return an EACCES error.

  • Comment on Re: Socket problem - when running Win32 app as someone different than Admin

Replies are listed 'Best First'.
Re: Re: Socket problem - when running Win32 app as someone different than Admin
by JamesNC (Chaplain) on Feb 03, 2003 at 16:03 UTC
    Thanks for your reply - derby... On Win32 - Ping.exe gives Read/Execute and Read permissions to group Users, which is the same permission that myPing script fails under. I can ping.exe even as Guest. I already know that if I change the script to run as someone with admin rights that that will work. I was hoping to get the EACCES error so that I could confirm that NiX is not allowing me to write (send) to to ICMPECHO port... I can bind to an arbitrary socket. I tested that with another client/server with permissions User.