Subject: Will Solaris disk quotas work in a wu-ftp chroot'd environment

From: Cameron Lemon <[email-masked]>
Date: Tue, 04 Aug 1998 08:05:33 -0300

Hi.

I'm sure that this question has been posed before, but here it goes.
I would like to setup disk quotas within my chroot'd ftp filesystem.
Now, I am expecting that in order to have quotas work, that I will have
to copy all of the associated binaries, plus the libraries into
the ftp chroot'd environment.  Has anyone else performed this kind of
operation successfully?   Is there another way to limit how much data a
user within the chroot'd environment can allocate?

Thanks.

Cameron Lemon

---

From: Gregory A Lundberg <[email-masked]>
Date: Tue, 4 Aug 1998 09:57:19 -0400 (EDT)

On Tue, 4 Aug 1998, Gregory A Lundberg wrote:

> BTW, there's some old patches in the mailing list achives to add majoc
> cookies for quotes so used can see their limits, etc., in message files.

Translating from typo to English: there is an old patch in the mailing
list archives to add magic cookies for quotas so users can see.

Yes, I know the archives are offline right now.

----

Gregory A Lundberg		Senior Partner, VRnet Company
1441 Elmdale Drive              [email-masked]
Kettering, OH 45409-1615 USA    1-800-809-2195

---

From: Cameron Lemon <[email-masked]>
Date: Tue, 04 Aug 1998 10:38:46 -0300

Gregory A Lundberg wrote:

> On Tue, 4 Aug 1998, Cameron Lemon wrote:
>
> > I'm sure that this question has been posed before, but here it goes.  I
> > would like to setup disk quotas within my chroot'd ftp filesystem.  Now,
> > I am expecting that in order to have quotas work, that I will have to
> > copy all of the associated binaries, plus the libraries into the ftp
> > chroot'd environment.  Has anyone else performed this kind of operation
> > successfully?  Is there another way to limit how much data a user within
> > the chroot'd environment can allocate?
>
> Quotas and chroot are different issues.  Set the quotas as you normally
> would, chroot shouldn't effect them.

Ok.

>
>
> In chroot'd area, yes, you'l need to set up the binaries and support
> files.  See the FAQ for Solaris-specific instructions.

I am running wu-ftpd in a chroot'd environment with /data/ftp as a 6gig
filesystem.  About20 user accounts exist.  I want to be able to define limits
as to the amount of space each
is able to allocate.  If JoeUser has quotas set to 20Mb and 19 currently are
allocated.  JoeUser
proceeds to dump a 3 Mb file into his spot within /data/ftp.  Will quotas
disallow this transfer when 1 of the 3Mb is transferred so to speak?  Each of
the 20 users using this archive have only
ftp accounts.

>
>
> Another way to achieve filesystem limits is to loopback-mount the chroot'd
> area.  That way you're using filesystem size as the limit rather than
> quotas.

Not familiar with loopback-mount.

---

From: Gregory A Lundberg <[email-masked]>
Date: Tue, 4 Aug 1998 09:24:19 -0400 (EDT)

----

---

From: Gregory A Lundberg <[email-masked]>
Date: Tue, 4 Aug 1998 09:41:54 -0400 (EDT)

On Tue, 4 Aug 1998, Cameron Lemon wrote:

> filesystem.  About20 user accounts exist.  I want to be able to define
> limits as to the amount of space each is able to allocate.  If JoeUser
> has quotas set to 20Mb and 19 currently are allocated.  JoeUser proceeds
> to dump a 3 Mb file into his spot within /data/ftp.  Will quotas
> disallow this transfer when 1 of the 3Mb is transferred so to speak? 
> Each of the 20 users using this archive have only ftp accounts. 

Quotas are usaually based upon inode ownership.  The upload statement in
the ftpaccess file _should_ allow you to control that for anonymous
uploads as well as real and guest users.  If it doesn't, take a look at my
VR3/VR4 patches for some fixes for upload.

ISTM the upload will proceed as normal until the quota limit is reached.
At that point, the daemon should toss an error and abort the transfer.

> Not familiar with loopback-mount.

Dunno what it's called on Solaris.  On Linux, you read manpage on losetup
and have the option gen'd into the kernel.  Basically, you're creating a
filesystem in a file then mounting that.  NFS will also work, export an
area, then mount it.  I don't like NFS myself, though.

----

---

From: Eilon Gishri <[email-masked]>
Date: Wed, 5 Aug 1998 17:53:17 +0300

> Yes, I know the archives are offline right now.
I'm the author of this patch which can be found at

ftp://ftp.tau.ac.il/pub/users/eilon/wu-ftpd/

-- 
Eilon Gishri					[email-masked]
Security Consultant				Office: +972-3-6406723
Israel Inter University Computation Center	Fax:	+972-3-6409118
  /* On a matter of national security */	Home:	+972-3-5078671