Username of "000" causes quota info display incorrectly

Create a website with a username of "000", such as Virtualmin displays the used disk quota incorrectly under "Quotas and limits". It displays "3.01GB" when "du -sch /home/000" displays "2.5M".

This is reproducible on fresh installs of both Ubuntu 12.04 and 14.04.

Home disk space used (including sub-servers) 3.01 GB (2.98 MB by server administrator, 0 bytes by mail / FTP users)
Space used by databases 8 kB (8 kB in this server, 0 bytes in sub-servers)
Total disk space used 3.01 GB
Bandwidth usage since 03/01/2015 2.13 MB


Wow, that's a case I didn't consider before. I suspect the cause is that the quota commands cannot distinguish between the username 000 and the UID 0, which is for the root user. So you are probably seeing root's disk usage.

My only suggestion would be to rename the user to "zero" instead. This can be done when creating the domain, or on the Change Domain Name page.

I'm fine with changing the username, but should virtualmin itself handle this in the future?

If you'd prefer to not change the quota reporting to handle this case, then perhaps you could at least prevent a username containing all "0" from being created? A step further would be to autogenerate usernames like "zerozerozero" instead of "000".

Yes, Virtualmin should prevent this - I'll fix it in the next release.