How to run my own FTP server without root permissions

Hi all,
I need your help with this problem.

I have my own ftp server implemented in java. If I start it as root it is successfully binded to port 21 and everything works. Now I want to run it as non-root user, but for binding to port 21 it needs root rights. How to solve it?

I alrady try xinetd, but it probably has no feature I need (xinetd starts for each request new instance of server whether single-treaded or not, but I need to start one instance of my ftp server which is capable to handle many request at one time itself).

Any ideas are welcomed.
Regards,
Jirka

If you'd used any language but java, I'd suggest running it as root and using setuid to reduce permissions thereafter. But this'd be meaningless for a java thread...

I don't know how your server is implemented, but you might want to take a look at Perderabo's post in this thread.

I wrote something similar for my own personal use. If you want to support multiple user authentication, etc. , that would be impossible without root, as previously specified in the link above.

But if you are only going to be using this as a file transfer tool for one user, you can run the server as that user. Just change the port to a number between 1024 and 65536. ( First 1024 are generally reserved for system use and it's possible you won't have permissions to bind to them. )