check-config disables quota

Hi there,

since about 4 days ago, quota seems to be disabled on a server - I've activated jailkit for some virtual hosts at this time.

Now, I can go to Webmin -> System -> Disk Quota and click on "enable quotas" -> they are enabled, I can see user and group quota. Filesystem is mounted with quota support, too:

:~# mount|grep quota /dev/sda2 on / type ext4 (rw,relatime,quota,usrquota,grpquota,errors=remount-ro) /dev/sda2 on /home/chroot/136256363931661/home/xxxxxt type ext4 (rw,relatime,quota,usrquota,grpquota,errors=remount-ro)

But: doing virtualmin check-config, it shows "... Quotas are not enabled on the filesystem / which contains home directories under /home and email files under /home. Quota editing has been disabled. ".

After that, in Webmin -> System -> Disk Quota the quota support is disabled, again.

I see this on another server, where /home is mounted separately - 'virtualmin check-config' disables the quota support for /home, while leaving quota support for other partitions like /home/my-special-server enabled.

What can we do here?

If you need some more information, I'm glad if I can help.

Best wishes Falko



Ilia's picture
Submitted by Ilia on Fri, 05/15/2020 - 13:08


Do you have have quotas enabled for both / and /home?? If not enabled it!

What are the outputs of:

quota -v -u
quota -v -g
cat /etc/fstab
cat /etc/mtab

I made a patch but I don't think it will affect your case in any way.

Hi Ilia,

thanx for your help.

a) on server1, there's only "/" - no "/home" mounted - server1.txt

b) on server2, clearly the 1st volume with quota gets disabled: "/home", others remain enabled - server2.txt

Don't know if the nfs volume was mounted as it is now, just cannot unmount ATM - maybe I'll try that later.

The patch did not help as you expected,

I'll try to dig into it a bit further and let you know.

Here we go: checking in Web-GUI using Virtualmin -> System Settings -> Re-Check Configuration does work ... "Both user and group quotas are enabled for home and email directories."

Using etckeeper, I found the quota settings got first time lost on server2 at the upgrade from virtualmin 6.07 to 6.08 in Oct. 2019. See some shortened findings in etckeeper git for server2. BTW: Webmin upgrade from 1.930 to 1.932 was two days earlier.

As I cannot find any commit regarding quotas between 6.07 and 6.08 I have another suspicion now: locales. I'm using 'virtualmin check-config' very often on command line ... logged in by ssh. We have locale settings here like "LC_LANG=de_DE.utf8" etc. And the upgrade by apt from 6.07 to 6.08 has been done using ssh, too.

To prove that, I did the following: changed "AcceptEnv" in /etc/ssh/sshd_config to not include "LANG LC_* ", restartet ssh, did relogin - and bingo: virtualmin check-config does not disable quota.

Reenabling AcceptEnv, doing the check: quotas are disabled.

So for now, I've got some possible workarounds - unset LANG and LC_* before check-config, comment "SendEnv LANG LC_" in /etc/ssh/ssh_config on the client or 'AcceptEnv LANG LC_' in /etc/ssh/sshd_config on the server.

May be, virtualmin is relying on system commands, while its output is changed by language vars. And you could unset 'em before? Or something other has changed ...

BTW: I've found it always strange, that a command called "check-config" does not only check ... but also changes settings, sometimes really important ones - and doesn't even notify about which changes have been done.

IMHO 'virtualmin check-config' should really only do the check - and may be something like "fix-config" could then change settings ... but that's another story.