max size and quotas

Richard Sharpe sharpe at
Wed Nov 3 02:53:22 GMT 1999

At 09:14 PM 11/3/99 +1100, T.D.Lee at wrote:
>> > BTW: Does anybody have a good idea to alert users once they exceed their
>> > soft quotas? Right now I'm sending an email once per day, but I think
>> > the warning should be more immediate unfortunately there doesn't seem to
>> > be any non-polling way to detect this condition so the best thing I can
>> > think of is calling repquota rather frequently (e.g. once per half-hour)
>> > and notifying users via winpopup if they haven't already been notified.
>> i think this would be very useful if handled at a lower level within
>> samba.
>> what i envision is that whenever an open, create, or write fails, the
>> samba server could detect that the cause of the failure was a quota
>> violation and then call an exception handler defined in smb.conf.
>> the exception handler could call winpopup or whatever to alert the user.
>> does this sound doable?  would it require major changes to the guts of
>> samba?
>Has there been any follow-up on this?  We would very much like such a
>facility here, including, if possible, warning users of impending danger
>as they exceed their soft quota limit. 
>But is this "smb.conf" the best implementation?  Is the functionality
>possible within SMB/CIFS?  Would the latter, if technically possible, be
>I'd be happy to take a first look myself.  But I know very little (read
>"nothing") about SMB/CIFS protocol details.
>Where can I begin reading about the details of open/read/write calls in
>SMB/CIFS and/or conveying information/warning/error details?  I have seen
>(though not read in detail!) RFC1001 and RFC1002.  Is this the best (or
>most appropriate/relevant) source?

OK, my 2 Pfennings worth ...

The calls that open files for writing and that write them simply return an
error code if things fail.  It would be up to the client to implement some
sort of exit that tells you that it was quota exceeded, but I don't think
there is any special code for that.

I think the easiest is goint to be the original suggestion, have something
defined in the smb.conf that specifies a script or some action when quota
is exceeded, and then send a popup message to the client with the error.

>:  David Lee                                I.T. Service          :
>:  Systems Programmer                       Computer Centre       :

Richard Sharpe, sharpe at, Master Linux Administrator :-),
Samba (Team member,, Ethereal (Team member,
Co-author, SAMS Teach Yourself Samba in 24 Hours
Author: First Australian 5-day, intensive, hands-on Linux SysAdmin course

More information about the samba-technical mailing list