Re: [SLUG] linux quotas -> trigger event when over soft quota

From: Eben King (eben1@tampabay.rr.com)
Date: Sat Jan 10 2004 - 20:51:11 EST


On Sat, 10 Jan 2004, Backward Thinker wrote:

> Does anyone know of a way to trigger an action or command as a user
> passes their soft quota limits? I looked in the Linux Quota mini-HOWTO,
> and I didn't see anything that would really trigger a script or
> anything. The best solution I see is a periodic cron job to examine
> quotas and take action if a user is over the soft limit, but it seems
> like there should be a better way...? This is with a 2.4.x kernel
> compiled with quota support and an ext3 filesystem, but I'm open to
> other filesystems if they have the feature and ext3 simply doesn't.

If you find one, make sure it has limits so a user can't DoS you like
this:

fill up ~ to 1 KB less than soft limit
while true ; do
 dd if=/dev/zero of=small-file bs=1K count=2
 rm small-file
done

-- 
-eben    ebQenW1@EtaRmpTabYayU.rIr.OcoPm    home.tampabay.rr.com/hactar
                  "God does not play dice" -- Einstein
          "Not only does God play dice, he sometimes throws
          them where they can't be seen." -- Stephen Hawking

----------------------------------------------------------------------- This list is provided as an unmoderated internet service by Networked Knowledge Systems (NKS). Views and opinions expressed in messages posted are those of the author and do not necessarily reflect the official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:19:24 EDT