You can use netstat to see all processes that have ports open, that will list information like the ports that are open and the names and process IDs of the programs that have those ports open.
You can also use fuser to determine which programs have a particular port open.
You can use the ps command to find the owner of a particular process (user, root etc).
I was going to post some code snippets to demonstrate the commands I've mentioned, but then I found this tutorial which saves me the bother! XD