Find PID using a Port?

Hi,

I do not have root user credentials nor do I have the functional id of the process that uses port 80.

How can I find the pid of the process using the port number 80 ?

Operating System: Linux

Port 80? Almost certainly your webserver, whatever it is. If it's apache, the PID may be in /var/run/apache.pid or the like.

As far as mapping a socket to its owner, I believe that requires privilege.

What is it that you are trying to accomplish? I mean the bigger picture. Perhaps there is another way to get it done.

Regards,
Alister

I have a web url like www.central-mosque.com

I want to figure out which application server they are using to host the website.

Mohtashims,

try

for such queries on identifying the information for web servers...

---------- Post updated at 01:07 PM ---------- Previous update was at 01:05 PM ----------

try using

 'lsof -i:80' 

for identifying what is using the port 80

That should work... if he had root acccess.

Port 80 is almost always used by a web server however there's a small chance you have a non-standard configuration; unfortunately we cannot just assume yours is the same case.

Perhaps you can run nmap from a different server in the same network and query the original server to see if it indeed responds to HTTP requests.

Now, getting the PID would be another story.

based on the query, this is what I understood.

@Mohtashims, are you looking for something like this or its still unclear.

Regards,
Nasir