how can i listen port under 1024 with a non root user

If it doesn't fit in another category, ask it here.
Post Reply
dxuranus
Posts: 5
Joined: 2006/05/12 05:40:50

how can i listen port under 1024 with a non root user

Post by dxuranus » 2006/06/01 02:43:18

i make a few piece of code listen port.
when i login with root it work pretty well but when i switch to a non root user i found i can't listen port under 1024.
after searching through google i find some information that is a non root user can't access port under 1024.
so hwo can i break this praxis .
i need some concerate solution.
thanks for any help.

wizard
Posts: 25
Joined: 2006/08/15 13:46:12
Location: surreal city, usa
Contact:

Re: how can i listen port under 1024 with a non root user

Post by wizard » 2006/08/18 16:14:58

[quote]dxuranus wrote:
i make a few piece of code listen port.
when i login with root it work pretty well but when i switch to a non root user i found i can't listen port under 1024.
after searching through google i find some information that is a non root user can't access port under 1024.
so hwo can i break this praxis .
i need some concerate solution.
thanks for any help.[/quote]

Your application has to use setuid() to listen as a non-root user.

Post Reply

Return to “CentOS 4 - Miscellaneous Questions”