From: Nat Pryce Date: 2002-05-03T19:47:18+09:00 Subject: Re: Ruby on Port 23 without admin access You'd be better off asking this on a Unix or Linux programming list or consulting a book on Unix programming, but here are some ideas to get started. 1) Start your daemon running as root. 2) Use chroot (2) to change the root of the directory tree 2) Open the TCP port. 3) Use setuid (2) and setgid (2) to switch to a user and group with less privileges. This will stop the process from using chdir to leave the chrooted environment. 4) Start listening on the port. Cheers, Nat. ________________________________ Dr. Nathaniel Pryce B13media Ltd. Studio 3a, Aberdeen Business Centre, 22/24 Highbury Grove, London, N5 2EA http://www.b13media.com ----- Original Message ----- From: "Firestone, Mark - Technical Support" To: "ruby-talk ML" Sent: Friday, May 03, 2002 11:06 AM Subject: RE: Ruby on Port 23 without admin access > Ok. Well, this is kind of a drag. I want the software to answer the telnet > port, but I wanted to set it up so if somehow someone found a hole in it, > they would be stuck in one directory tree. > > If I run it as root, it could be very dangerous... > > If I run it on say, port 2323, the I suspect people will have more trouble > connecting. > > Ideas? > > Thanks, > > mark > > -----Original Message----- > From: Cameron McBride [mailto:cameron@cwru.edu] > Sent: 03 May 2002 10:25 > To: ruby-talk@ruby-lang.org > Subject: Re: Ruby on Port 23 without admin access > > > > In general, any port below roughly 1000 needs admin access to bind to > > it. You can however pick a lower port number and bind to that without > ^^^^^ --> read as 'higher' > Coffee hasn't hit the fingers yet. > > admin access. > > Cameron > > NOTICE: This e-mail and any attachment(s) may contain confidential and > proprietary information of Goss International Corporation and/or its > subsidiaries and may be legally privileged. This e-mail is intended solely > for the addressee. If you are not the addressee, dissemination, copying or > other use of this e-mail or any of its content is strictly prohibited and > may be unlawful. If you are not the intended recipient please inform the > sender immediately and destroy the e-mail and any copies. All liability for > viruses is excluded to the fullest extent permitted by law. Any views > expressed in this message are those of the individual sender. No contract > may be construed by this e-mail. >