virtualmin / virtualmin-gpl

Virtualmin web hosting control panel for Webmin
https://www.virtualmin.com
GNU General Public License v3.0
376 stars 118 forks source link

Home directory quota options are not logical in defaults for new users in this virtual server #997

Open PitWenkin opened 3 months ago

PitWenkin commented 3 months ago

Short version:

The options Default (from template) and Unlimited are not doing what the labels suggest but what the respective other option suggests …

Details:

Under Server Template - Mail for domain I have set a quota of 50MiB for mail users

Screenshot 2025-01-15 at 10 22 42

In the domain specific setting for User Defaults the interface shows Home directory quota as Unlimited, but when adding a new mail user the 50MiB form the server template are applied, which should only happen when Default (from template) is selected?

Screenshot 2025-01-15 at 10 12 28

Selecting Default (from template) actually applies no quota …

Selecting the third option propperly applies the given quota.

jcameron commented 3 months ago

Thanks, that does look like a bug! Let me take a look ...

jcameron commented 3 months ago

Can you post the contents of the file /etc/webmin/virtual-server/initial/XYZ where XYZ is the domain's unique numeric ID? You can get that by running virtualmin list-domains --domain yourdomain.com --id-only

PitWenkin commented 3 months ago
dbs=
shell=/dev/null
secs=
quota=none

While Interface shows

Image

PitWenkin commented 3 months ago

I've had this on 2 servers, settings above are from my dev-machine, which might be fucked up, but behaves in the same way as the others.

My guess is that simply switching the labels for option 1 and 2 would "fix" it

PitWenkin commented 3 months ago

When selecting Unlimited:

dbs=
shell=/dev/null
secs=

When selecting 25 Mib:

dbs=
shell=/dev/null
secs=
quota=25600
jcameron commented 3 months ago

Ok I see the bug now - this will be fixed in the next release.

iliajie commented 3 months ago

@PitWenkin Try applying the patch and see if it resolves the problem for you:

webmin patch https://github.com/virtualmin/virtualmin-gpl/commit/a4e5c37
PitWenkin commented 3 months ago

@PitWenkin Try applying the patch and see if it resolves the problem for you:

webmin patch https://github.com/virtualmin/virtualmin-gpl/commit/a4e5c37

It's worse. I still had 25MB saved

dbs=
shell=/dev/null
secs=
quota=25600

but interface shows

Image

Even after saving it does not change …

iliajie commented 3 months ago

Great! Thanks for giving it a try! Now we'll wait for Jamie's comment on this...

jcameron commented 3 months ago

Hmm, let me take another look at this..

PitWenkin commented 1 month ago

Quotas from template are still not applied when selecting Default (from template) but are when when selecting Unlimited

Webmin version 2.302
Usermin version 2.202
Virtualmin version 7.30.7 
iliajie commented 1 month ago

Quotas from template are still not applied when selecting Default (from template) but are when when selecting Unlimited

Virtualmin 7.30.7 was a bug fix release, so it may not include all the changes Jamie made. There are development Virtualmin builds available for testing, but they’re not recommended for production systems.