Since 2003 we compiled several samba-versions. In every version we used to update, there was the same problem, using samba's hard-/softlimit-quota: If you reach with a WindowsXP-client a definated quota softlimit of a samba-share, it behaves just like a hardlimit (under windows). So, every following access is blocked! But isn't the sense of a softlimit, that there's a little bit more range up to an existing hardlimit? So, whatever, our proposal to fix this problem, is the following patch, that we are now using since 2003 (in every updated samba-version) and it worked very fine. Perhaps, it will be possible to implement this regularly? :-) ************************** snip ******************************************* *** source/smbd/quotas.c Sun Jul 13 01:57:56 2003 --- source/smbd/quotas.c.orig Sun Jul 13 01:59:43 2003 @@ -227,7 +227,8 @@ } /* Use softlimit to determine disk space, except when it has been exceeded */ - if ( + // Kick it! :) + /* if ( (D.softlimit && D.curblocks >= D.softlimit) || (D.hardlimit && D.curblocks >= D.hardlimit) || (D.isoftlimit && D.curinodes >= D.isoftlimit) || @@ -237,12 +238,14 @@ *dsize = D.curblocks; } else if (D.softlimit==0 && D.hardlimit==0) { return(False); - } else { - if (D.softlimit == 0) - D.softlimit = D.hardlimit; + } else { */ + // Setting softlimit to hardlimit, + // so windows uses/accepts the real hardlimit + // if (D.softlimit == 0) + D.softlimit = D.hardlimit; *dfree = D.softlimit - D.curblocks; *dsize = D.softlimit; - } + // } return (True); } /* Credits for this simple patch to: Gregor Lawatscheck, Berlin (Germany), www.mpexnet.de */ ************************** snip ******************************************* Best regards, /Thorsten Edler, Berlin (Germany)
This is a pretty critical bug in my opinion, it really messed us up at our site and should be fixed as soon as possible for mainstream release. Granted it's a bug in the way WindowsXP accept stuff too, but surely this is a fairly major issue for anyone trying to really implement quotas on users.
We've tested this. It's fixed now in 3.4.3 (possibly earlier version)! Many thanks!
this fix was not applied to mainstream yet.
apparently still a problem, reopening.
it's not as simple as that. Windows does not know the concept of grace time. So if we tell the client that he has $hardlimit space then he will be surprised when he cannot write anymore $gracetime days after he crosses the $softlimit barrier. Windows only knows the concept of a quota warning level, which is similar but in the end completely different from teh softlimit/gracetime concept. I would recommend to set the soft and the hard limit to the same value to not let the windows user run into trouble that arise when they get cross the softlimit and run out of gracetime.