ftp problems

David Richards DavidR at eurosoft-uk.com
Fri Nov 8 17:08:20 GMT 2002


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C28749.7035EDA0
Content-Type: text/plain;
	charset="iso-8859-1"

thanks. The plan was to have about 10,000 users and i couldnt see any other
way of doing it. I am now going to have a look at this proftpd and mysql
stuff now


david

-----Original Message-----
From: Paul Robinson [mailto:paul at iconoplex.co.uk]
Sent: 08 November 2002 17:06
To: David Richards
Cc: 'freebsd-users at ukug.uk.freebsd.org'
Subject: Re: ftp problems


On Nov  7, David Richards <DavidR at eurosoft-uk.com> wrote:

> Just a little off topic here! any one know of a limit for the amount of
user
> account u can have on the system. 

It depends on how many UIDs you can have on the box. I know on Linux boxes I
was adminning a few years back (which had over 64k users) the limit was 64k
users (don't ask how we bodged it - it's secret). I'm not sure what type of
int is used in FreeBSD, but I seem to recall it's an unsigned long which
(gosh, it's a while since I last did C!) should give you around 4 billion
UIDs possible. However, if all you are doing is creating FTP accounts, this
is not the way to do it:-

It seems ridiculous to use up a UID just for an FTP account, and it is,
especially as you will end up having a ridiculously long /etc/passwd and
associated files which will take forever to parse, and therefore it will
take forever to log in (trust me, I've done it). So, if you're expecting
many thousands of users, use something like ProFTPd with the MySQL patch and
put your usernames, passwords, etc. into the MySQL table. Your file tree is
chown'ed to the proftpd user and group, it implements a decent chroot and
jail so users can't escape and go looking elsewhere, and logins are nice and
quick thanks to MySQL. You also have the added advantage of being able to
write adduser, rmuser and passwd web front ends in PHP in about 5 minutes.

I know it wasn't what you asked, but I hope that helps. When you realise 
that with exim and qpopper you can move mail over to that environment, you 
will slowly start wanting more and more of your sysadmin time to be spent in

MySQL. ;-)

P.S. - your permissions are fine, I can't see what's wrong either. Sorry I 
can't be of any help there.

-- 
Paul Robinson

------_=_NextPart_001_01C28749.7035EDA0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>RE: ftp problems</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>thanks. The plan was to have about 10,000 users and i =
couldnt see any other way of doing it. I am now going to have a look at =
this proftpd and mysql stuff now</FONT></P>
<BR>

<P><FONT SIZE=3D2>david</FONT>
</P>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Paul Robinson [<A =
HREF=3D"mailto:paul at iconoplex.co.uk">mailto:paul at iconoplex.co.uk</A>]</F=
ONT>
<BR><FONT SIZE=3D2>Sent: 08 November 2002 17:06</FONT>
<BR><FONT SIZE=3D2>To: David Richards</FONT>
<BR><FONT SIZE=3D2>Cc: 'freebsd-users at ukug.uk.freebsd.org'</FONT>
<BR><FONT SIZE=3D2>Subject: Re: ftp problems</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>On Nov&nbsp; 7, David Richards =
&lt;DavidR at eurosoft-uk.com&gt; wrote:</FONT>
</P>

<P><FONT SIZE=3D2>&gt; Just a little off topic here! any one know of a =
limit for the amount of user</FONT>
<BR><FONT SIZE=3D2>&gt; account u can have on the system. </FONT>
</P>

<P><FONT SIZE=3D2>It depends on how many UIDs you can have on the box. =
I know on Linux boxes I</FONT>
<BR><FONT SIZE=3D2>was adminning a few years back (which had over 64k =
users) the limit was 64k</FONT>
<BR><FONT SIZE=3D2>users (don't ask how we bodged it - it's secret). =
I'm not sure what type of</FONT>
<BR><FONT SIZE=3D2>int is used in FreeBSD, but I seem to recall it's an =
unsigned long which</FONT>
<BR><FONT SIZE=3D2>(gosh, it's a while since I last did C!) should give =
you around 4 billion</FONT>
<BR><FONT SIZE=3D2>UIDs possible. However, if all you are doing is =
creating FTP accounts, this</FONT>
<BR><FONT SIZE=3D2>is not the way to do it:-</FONT>
</P>

<P><FONT SIZE=3D2>It seems ridiculous to use up a UID just for an FTP =
account, and it is,</FONT>
<BR><FONT SIZE=3D2>especially as you will end up having a ridiculously =
long /etc/passwd and</FONT>
<BR><FONT SIZE=3D2>associated files which will take forever to parse, =
and therefore it will</FONT>
<BR><FONT SIZE=3D2>take forever to log in (trust me, I've done it). So, =
if you're expecting</FONT>
<BR><FONT SIZE=3D2>many thousands of users, use something like ProFTPd =
with the MySQL patch and</FONT>
<BR><FONT SIZE=3D2>put your usernames, passwords, etc. into the MySQL =
table. Your file tree is</FONT>
<BR><FONT SIZE=3D2>chown'ed to the proftpd user and group, it =
implements a decent chroot and</FONT>
<BR><FONT SIZE=3D2>jail so users can't escape and go looking elsewhere, =
and logins are nice and</FONT>
<BR><FONT SIZE=3D2>quick thanks to MySQL. You also have the added =
advantage of being able to</FONT>
<BR><FONT SIZE=3D2>write adduser, rmuser and passwd web front ends in =
PHP in about 5 minutes.</FONT>
</P>

<P><FONT SIZE=3D2>I know it wasn't what you asked, but I hope that =
helps. When you realise </FONT>
<BR><FONT SIZE=3D2>that with exim and qpopper you can move mail over to =
that environment, you </FONT>
<BR><FONT SIZE=3D2>will slowly start wanting more and more of your =
sysadmin time to be spent in </FONT>
<BR><FONT SIZE=3D2>MySQL. ;-)</FONT>
</P>

<P><FONT SIZE=3D2>P.S. - your permissions are fine, I can't see what's =
wrong either. Sorry I </FONT>
<BR><FONT SIZE=3D2>can't be of any help there.</FONT>
</P>

<P><FONT SIZE=3D2>-- </FONT>
<BR><FONT SIZE=3D2>Paul Robinson</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C28749.7035EDA0--




More information about the Ukfreebsd mailing list