Fixed Confused by Media Quota permissions

Mr Lucky

Well-known member
I have set permissions for a usergroup so the max file upload is 1MB, and a quota of 2 MB

I am testing this with a test user in that usergroup, and while they cannot exceed the 1MB upload size, it seems their quota can be exceeded.

These are the permissions:


Logged in as that user I uploaded four images totalling 2.9MB

So with 2.9MB alrady uploaded I uploaded a fifth file and noticed that this implying that the quota is either not being counted or that there is some other setting which is over-riding the permission

Affinity PhotoScreenshot002.png

Is anyone able to explain what could my problem be? I'm sure there must be a very simple explanation.

This is the album (currently 3.8MB uploaded):
Last edited:


Active member
Use the permissions analyzer for the username and check the media gallery max quota.


XenForo developer
Staff member
Can you run the "XFMG: Rebuild user media quotas" cache rebuild? Does that change the behavior, such as changing the remaining storage? If so, that may indicate that there's a potential bug with quota updates that we'd need to look into.

Mr Lucky

Well-known member
OK, I ran that cach. I had thought of that but then decided to mention it here first in case it is a bug.

After running the cache then I got the expected storage available, ie 0bytes (compare with screenshot in post #1 which erroneously says 2MB)



After trying an upload which (now correctly) fails, I get this, which seems to contradict the above


There should be 0Mb remaining because the files stored are 3.8MB and so obviously exceed the quota of 2MB

Mr Lucky

Well-known member
Any news on this? I'm getting some very confused members now the cache is rebuilt, many have exceeded quotas in reality, but are very confused when they get the message they still have remaining quota.

Chris D

XenForo developer
Staff member
There's two bugs here.

The first is the error message was using the wrong figure to calculate the remaining storage. That has been fixed and is now more robust for the next release.

The second is that, for reasons I don't quite understand right now, the code which updates the user's quota doesn't get run. I've worked around this for now and that is included in the next release, but I do need to look into that in more detail.