port availability- linux redhat 5
Hi All,
I am using "lsof -i:<Port Number>" & "netstat -anp| grep <port number>" commands to check the free ports available on my Linux(redhat) machine. But the problem with above commands is that, it wont show the process details of a particular port if it is running from an user account which is different with which i logged in. Do we have any command or work around by which we can check whether a port is owned by any process (or any other user account ) even if we dont have root access. Please suggest |
Pretty sure it's not possible, maybe you can run it via sudo securely?
|
oh seriously , so there is no way out to find the ports owned by different user accounts as i dont have root or sudo access
|
Actually, if you try eg netstat as non-root, it actually tells you this
Code:
netstat -tanp |
I am not able to see the non-owned process info for a particular port,so only ROOT can check which all ports are owned by users
|
Quote:
|
Nice :) ;)
|
I am still getting below error , when i am using netstat -pant| grep 10003.It doesnt give the desired result
(Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) |
Quote:
|
I mean without being root does this mean that i cannot locate the process running on particular port if it is owned by differnt user id with which i logged in ?
|
yes, that would be a privilege violation if it were possible.
|
Thanks chris
|
All times are GMT -5. The time now is 06:13 PM. |