/usr/local/cpanel/scripts/fixquotas is the answer when quota reports diverge from reality across many users. It is also a script that walks the entire filesystem to recompute usage — on a server with 200 cPanel accounts and a 4 TB /home, an hour is not unusual. Running it during peak hours is workable but not ideal; running it during a backup window is asking for trouble.
What’s happening
fixquotas calls quotacheck against /home (and any other mounted filesystem with quotas) and then reapplies cPanel’s per-account caps. During the scan, kernel quota enforcement is paused — writes succeed, but per-user totals are not enforced until the scan completes. If fixquotas is interrupted, the quota state can be left half-applied, and the only safe recovery is to run it again to completion.
How to verify
Before running, get a baseline:
df -h /home
quotacheck -avug --no-mount-check
/usr/local/cpanel/scripts/fixquotas --help
tail -f /var/log/quota_repair_history.log
Estimate the time budget by file count: find /home -xdev -type f | wc -l. Roughly, plan one minute per 200,000 files on commodity SAS storage, half that on NVMe.
The fix
- Schedule the run outside the JetBackup/R1Soft window and outside peak traffic. Backups and
fixquotasboth pound the disk — concurrent execution doubles wall-clock time for both. - Notify affected stakeholders: writes still succeed, but quota enforcement is briefly relaxed. For high-trust environments that’s fine; for shared hosting with abusive accounts known to be at the cap, plan a short maintenance window.
- Run:
nohup /usr/local/cpanel/scripts/fixquotas > /var/log/fixquotas-run.log 2>&1 &. Putting it undernohupis not paranoid — losing the SSH session mid-run on a busy server is common, and a partial run is the worst outcome. - Monitor in another terminal:
tail -f /var/log/fixquotas-run.logandiostat -x 5. Disk wait spiking above 50% means you’re impacting site responsiveness — keep watch. - After completion, spot-check three accounts known to be near their cap with
quota -uand confirm the numbers match a manualdu -sh. If they don’t, the next step is filesystem fsck, not anotherfixquotasrun.
For environments where these maintenance tasks need to be scheduled and supervised, Stack Harbor runs them as part of cPanel/WHM management.