* allow binding privileged port
@ 2003-03-13 3:04 ChoongHwan Lee
2003-03-13 9:23 ` Timo Felbinger
0 siblings, 1 reply; 2+ messages in thread
From: ChoongHwan Lee @ 2003-03-13 3:04 UTC (permalink / raw)
Hello.
I'd like to run my own e-mail server in privileged port 25.
Though I can get privileged access on my system, I don't want to run
my program as 'root' account since my program is specified, and it is
dangerous to do so.
How can I configure to allow non-root user to bind and listen privileged port?
I've searched documents and articles in Tru64 website and newsgroup,
but I can't find anything related to this. Is it impossible?
Please help me.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: allow binding privileged port
2003-03-13 3:04 allow binding privileged port ChoongHwan Lee
@ 2003-03-13 9:23 ` Timo Felbinger
0 siblings, 0 replies; 2+ messages in thread
From: Timo Felbinger @ 2003-03-13 9:23 UTC (permalink / raw)
On 12 Mar 2003, ChoongHwan Lee wrote:
> Hello.
>
> I'd like to run my own e-mail server in privileged port 25.
> Though I can get privileged access on my system, I don't want to run
> my program as 'root' account since my program is specified, and it is
> dangerous to do so.
>
> How can I configure to allow non-root user to bind and listen privileged port?
> I've searched documents and articles in Tru64 website and newsgroup,
> but I can't find anything related to this. Is it impossible?
>
Standard method (and portable, too) would be to start the program as
root, bind the port, then use setuid() to drop the root privileges.
Alternatively, you might consider whether you could run your
server via inetd. That might be even simpler, as inetd can do
a lot of work for you: it will bind the port, listen to it, accept
connections, and launch one instance of your program, with a user
id of your choice, for every incoming connection.
(qmail runs in this mode, so you could look into qmail's sources
for more details).
Cheers,
Timo Felbinger
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-03-13 9:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-13 3:04 allow binding privileged port ChoongHwan Lee
2003-03-13 9:23 ` Timo Felbinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox