SUMMARY: Finding out what user owns a certain port



I asked:

I looked for this in the archives and on sunsolve, but I may have used
the wrong keywords in my search.

Is there a way to tell the uid of the process that controls a certain
port?

In other words, when I do a "netstat -an | grep "*.80 " to verify that a
webserver is running, is there a way to tell the uid of the process
responding to port 80?

TIA, and I will summarize.

The answer:

its the -i flag to lsof. I read through the man page several times but
managed to miss it. Thanks to all who responded so fast.

+-----------------------------------------------------------------------+
| Christopher L. Barnard O When I was a boy I was told that |
| cbarnard@xxxxxxxxxxxx / \ anybody could become president. |
| (312) 347-4901 O---O Now I'm beginning to believe it. |
| http://www.cs.uchicago.edu/~cbarnard --Clarence Darrow |
+----------PGP public key available via finger or PGP keyserver---------+
_______________________________________________
sunmanagers mailing list
sunmanagers@xxxxxxxxxxxxxxx
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



Relevant Pages

  • RE: RWW fails from Internet
    ... Port 80 is not the general problem. ... >This newsgroup only focuses on SBS technical issues. ... When responding to posts via your newsreader, ... >| Subject: RE: RWW fails from Internet ...
    (microsoft.public.windows.server.sbs)
  • "desktop" firewall - opinions requested
    ... It shhould be possible to define rulesets specifing ... UID or GID, the application accessing the net, and the ... reqired port. ... I used the MAC framework, ...
    (comp.unix.bsd.freebsd.misc)
  • Re: New-bus unit wiring via hints..
    ... Are you saying that "we" should accept reality's change ... between the serial port number and the port marked '1' on most ... this to the OS via the _UID method, but the _UID is only guaranteed ... PNPBIOS) is I/O resources or the name of the device in the ACPI ...
    (freebsd-current)
  • Re: Automated Nmap Scans / Front End
    ... I am responsible for monitoring hundreds of machines ... -Have the tool scan all ranges to determine responding ... You can also consider using hping to check for the netbios port rather than a basic icmp. ...
    (Pen-Test)
  • Re: messagebus user
    ... What's this for and can the UID be changed? ... those files during the install, so you can't just edit that and be ... You have to fix each port individually. ... Portsnap/csup will overwrite your change so every time you upgrade you'll have to change it again. ...
    (freebsd-questions)