Submitted by watermark on Tue, 02/03/2015 - 12:59 Pro Licensee
Create a website with a username of "000", such as 000.example.com. 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
Status:
Active
Comments
Submitted by JamieCameron on Tue, 02/03/2015 - 17:04 Comment #1
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 UID0
, 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.
Submitted by watermark on Tue, 02/03/2015 - 18:39 Pro Licensee Comment #2
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".
Submitted by JamieCameron on Tue, 02/03/2015 - 21:14 Comment #3
Yes, Virtualmin should prevent this - I'll fix it in the next release.