Per-directory quota ?

Per-directory quota ?

Post by Rena » Thu, 12 Sep 2002 23:25:18



Hi all,

Does anyone know how to setup a per-directory quota ?

I know about the 'quota' command and I know that it does quota
checking per-user. The reason I cannot use this is because I have a
web environment, where sometimes the file is written with the
webserver's id on the user's directory.

Any hint ?

Thanks

 
 
 

Per-directory quota ?

Post by Dave Bro » Fri, 13 Sep 2002 03:08:33



> Does anyone know how to setup a per-directory quota ?

> I know about the 'quota' command and I know that it does quota
> checking per-user. The reason I cannot use this is because I have a
> web environment, where sometimes the file is written with the
> webserver's id on the user's directory.

I don't know how many users you have to contend with, but assuming
it's not hundreds... :)

You might create a separate mount for each user in need, and put a
quota on it.  If you can't create a seperate partition for each user
filesystem, you might look at the "--bind" option of the mount command
which lets you mount a subdirectory of some other filesystem as an
individual filesystem with its own options.

--
Dave Brown  Austin, TX

 
 
 

Per-directory quota ?

Post by Andreas Matter » Fri, 13 Sep 2002 04:27:16



> Does anyone know how to setup a per-directory quota ?
> I know about the 'quota' command and I know that it does quota
> checking per-user. The reason I cannot use this is because I have a
> web environment, where sometimes the file is written with the
> webserver's id on the user's directory.

a) put each directory on a seperate filesystem for quota and assign group
quotas or something
b)  write a wrapper script and check your own "quota" (du -s /directory)

--
Andreas Mattern          andreas.mattern at ikm.uni-karlsruhe.de
Institut fuer Keramik im Maschinenbau Uni Karlsruhe                            

There are 10 kinds of people in the world: those who understand binary,
and those who don't.

 
 
 

Per-directory quota ?

Post by * Tong » Fri, 13 Sep 2002 05:27:40



> Does anyone know how to setup a per-directory quota ?

IIRC, ACL will help you that. Or maybe you want to check out RSBAC:

Rule Set Based Access Control (RSBAC) for Linux
http://www.rsbac.org/

--
Tong (remove underscore(s) to reply)
  *niX Power Tools Project: http://xpt.sourceforge.net/
  - All free contribution & collection