You are not logged in.
Hello to all.
I am using java to create a simple network application and recently switched to linux from windows. The development started when I was still on windows. While trying to execute my app on linux I get the Permision Denied exception. Well I suppose this is normal because I am running it as a simple user. When running as root it works fine.
What I wanted to ask is what do to do in order to allow a simple user to create ServerSockets. I think the reason I need this is obvious. Opening a new console, logging in as root and execute the program is relatively time consuming while I could click on the Run button on eclipse (are there any other nice and powerfull IDE's like eclipse?).
Thanks in advance :D
I don't know anything about Java, but I assume your problem is
that you're trying to bind() to a port less than 1024... In all Unix
like systems, ports less than 1024 are reserved, and only root
is allowed to bind() to them... There's not much you can really
do to get around this restriction (short of changing the kernel code,
anyway)... Typically, servers that only need root privs for just
that simple act of bind()'ing immediately drop their privs as soon
as they've finished the bind(), and run the rest of their code
unpriviledged... I'm not sure of the appriate Java method of
doing such a thing, if it's even possible... *shrug*